I am using a simple form and submitting my textbox values to database,
<body>
<?php
if(isset($_POST["submit"]))
$des="Insert into enquiry(Companyname,Name,Phno,Email,Address,Comments) values
('".$_POST[txtcompname]."','".$_POST[txtname]."','".$_POST[txtphno]."',
'".$_POST[txtemail]."','".$_POST[txtaddress]."','".$_POST[txtcomments]."')";
$res1=mysql_query($des);
?>
<div align="left">
<form action="" method="post">
But it doesn't seem to get submitted? Any suggestion
When i use print_r($_POST);
i get
Array ( [txtcompname] => xv [txtname] => xcv [txtphno] => xcvx [txtemail] => xcv [txtaddresss] => xcv [txtcomments] => xcvxcv [submit] => submit )
and i get this error now,
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Address,Comments)
values ('zdc','sadcv','zdsv', 'sdcv','sdvcsdv','sdcv')' at line 2