|
 |
|
ช่วยผมหน่อยคับ ผมเขียนไฟล์ php ส่งข้อมูลเข้า phpmyadmin ไม่ได้ ช่วยดูหน่อยน้าว่าผมผิดตรงใหนอ่า |
|
 |
|
|
 |
 |
|
$sql = "Insert into pungklomuser values('$Number','$Name','$LastName',Email);";
|
 |
 |
 |
 |
Date :
2009-05-13 13:37:30 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณมากครับ จาลองดู
|
 |
 |
 |
 |
Date :
2009-05-13 14:05:36 |
By :
โจทาโร่ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมแก้แล้วคับมันก็ยังเป็นเหมือนเดิม
ผมกรอกข้อมูลแล้วมันก็เด้งกลับมาหน้าเดิมอ่ะคับ เหมือนไม่มีอะไรเกิดขึ้น ทำไงอ่า ฮือๆ
|
 |
 |
 |
 |
Date :
2009-05-13 14:19:42 |
By :
โจทาโร่ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
$sql = "Insert into pungklomuser (Number,Name,LastName,Email) values('$Number','$Name','$LastName','$Email')";
ผมว่าน่าจะประมาณนี้นะครับ เราต้องระบุฟิลล์ที่จะใส่ข้อมูลที่ DBก่อนแล้วค่อยส่งค่าเข้าไปนะครับ ลองดูนะครับไงก็แจ้งด้วย
|
 |
 |
 |
 |
Date :
2009-05-13 15:06:32 |
By :
ddsure |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
<form method="post"action="ตรงนี้ง่ะ">
ลองใส่แอคชั่น ดูครับ ถ้าแอชชั่นกับหน้าตัวเองก็ ใส่หน้าของมันเข้าไป
เช่น อ่ะครับ มั้ง
<form method="post"action="index.php">
ยังไม่ได้ งั้นตรง
Code (PHP)
<?php
$sql = "Insert into pungklomuser values('$Number','$Name','$LastName',Email);";
?>
เปลี่ยนเป็น
Code (PHP)
<?php
$sql = "INSERT INTO member_reserve (Number,Name,LastName,Email)";
$sql =$sql." VALUES('".$Number."','".$Name."','".$LastName."','".$Email."')";
?>
ดูครับ
แล้วก่อนโค้ดด้าน บน เอาไว้หลัง
Code (PHP)
<?php
$result = mysql_query($sql);
?>
ก็ได้ครับ
ประกาศตัวแปรเพื่อรับค่ามาจาก หน้า ที่มี form รับค่าดูครับ
Code (PHP)
<?php
$Number = $_GET['Number'];
$Name = $_GET['Name'];
$LastName = $_GET['LastName'];
$Email = $_GET['Email'];
?>
สู้ๆ ลองดูเน่อ
|
 |
 |
 |
 |
Date :
2009-05-13 15:07:58 |
By :
numarumay |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณมากคับ คุณ cena1310, plakrim, ddsure กะคุณ numarumay กว่าผมจะงมได้ ก็ปาเข้าไป 2 วัน...เหงือกแห้งเลยยย
|
 |
 |
 |
 |
Date :
2009-05-15 02:22:49 |
By :
โจทาโร่ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|