|
 |
|
ข้อมูลไม่ยอมเข้า database mysql กดแล้วข้อมูลไม่ยอมเข้าครับ มือใหม่ หัดเล่นครับงง |
|
 |
|
|
 |
 |
|
Code (PHP)

<body>
<?php
print "ชื่อผู้ใช้- $user<br>";
print "รหัสผ่าน-$pass<br>";
print "ชื่อ-$name<br>";
print "Email-$mail<br>";
print "ที่อยู่-$address<br>";
print "เพศ-$sexx<br>";
print "อายุ-$age<br>";
print "$hobby1<br>";
print "$hobby2<br>";
$host="127.0.0.1";
$userphp="root";
$passwd="123456";
$dbname="register";
mysql_connect($host,$userphp,$passwd) or die ("Not connect DB ");
mysql_select_db($dbname) or die("Not connect Dbname ");
$sql = "INSERT INTO userinfo
(user,pass,name,mail,address,sexx,age,hobby1,hobby2)
VALUES
('$user','$pass','$name','$mail','$address,''$sexx,''$age','$hobby1','$hobby2')";
$sqlquery=mysql_db_query($dbname,$sql);
print "บันทึกเสร็จ";
mysql_close();
?>
ช่วยดูให้ทีครับ พอดีเมื่อวานทำไปทำมามันลง แต่พอวันนี้ ลองเปลี่ยน ข้อมูลเปลี่ยนคาราง ลงของจริง host xp3.biz แต่พอดีหา connect host ของเว็บไม่เจอไว้วันหลังค่อยถามครับ เลยกับมาเล่น phpadmin ที่เครื่องลองดูอีกครั้งปรากฏว่า มันไม่ยอมบันทึก งงมากครับ นั่ง งงมาหลาย ชม มากมายครับ ช่วยทีครับ
Tag : PHP, MySQL

|
|
 |
 |
 |
 |
Date :
2011-02-20 04:25:52 |
By :
mazaoa |
View :
993 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ปัญหานี้เกิดจาก Ver Apache ให้ใส่
The PHP $_REQUEST Function เข้าไปด้วยกันการ get data for from
จะใช้เป็น $_REQUEST , $_GET , $_POST ก็ได้ลองดูครับ
|
 |
 |
 |
 |
Date :
2011-02-20 08:39:02 |
By :
cocacora |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|