I am really stuck in this one, Ii just can't get it working.
when i check my table after running this code, the record never gets added.
If you happen to spot the problem ( i am sure most of you will) please drop me a quick post and guide me)
// the table in which i am adding this record is called (BusFile) it is under a database called (Business)
<html>
<head>
<title>Business PHP add</title>
</head>
<body bgcolor="white">
<?php
foreach($HTTP_POST_VARS as $varname => $value)
$formVars[$varname]=$value;
$db1=mysql_connect($dbhost, $dbuname, $dbpass);
mysql_select_db("BusFile");
echo "Record Added<br><a href=\"BusinessAdd.htm\">click here</a>
to return to Business Information Control<br>";
$query="INSERT INTO BusFile set ".
"Status= \"".$formVars["Status"]."\",".
"Fname= \"".$formVars["Fname"]."\",".
"Lname= \"".$formVars["Lname"]."\",".
"Email= \"".$formVars["Email"]."\",".
mysql_query($query);
mysql_close($db1);
?>
</body>
</html>
what is this "set" doing in an INSERT Statement? I think it has to be "values".
I dont have any idea of this "mysql" but am aware of simple PL/SQL. might be, this works out in mysql too...
Bookmarks