Warning: mysql_db_query() [function.mysql-db-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\AppServ\www\test\insert.php on line 6
Warning: mysql_db_query() [function.mysql-db-query]: A link to the server could not be established in C:\AppServ\www\test\insert.php on line 6
เอ็กซิคิวต์คำสั่ง SQL ไม่ได้ Access denied for user 'ODBC'@'localhost' (using password: NO)
<?php //insert.php
$host = "localhost"; $username = "root";
$password = ""; $dbname = "form";
$sql = "insert into form (id,sex,name,lastname,adress,phonenum,email,sMonth1,sDay1,sYear1,cFlight1,flightNo1,sMonth2,sDay2,sYear2,timeA1,sMonth3,sDay3,sYear3,cFlight2,flightNo2,sMonth4,sDay4,sYear4,timeA2,cRoom1,sRoom1,cRoom2,sRoom2,cRoom3,sRoom3,cRoom4,sRoom4,cBed,sBed,specialReq) values
('0','$sex','$name','$lastname','$adress','$phonenum','$email','$sMonth1','$sDay1','$sYear1','$cFlight1','$flightNo1','$sMonth2','$sDay2','$sYear2','$timeA1','$sMonth3','$sDay3','$sYear3','$cFlight2','$flightNo2','$sMonth4','$sDay4','$sYear4','$timeA2','$cRoom1','$sRoom1','$cRoom2','$sRoom2','$cRoom3','$sRoom3','$cRoom4','$sRoom4','$cBed','$sBed','$specialReq')";
$result = mysql_db_query($dbname,$sql);
if (!$result){ echo("เอ็กซิคิวต์คำสั่ง SQL ไม่ได้ " . mysql_error() ); exit;}
else{echo "<font size=3 color = red >บันทึกข้อมูลเรียบร้อยแล้ว <br>";}
?>