user4fun Posted February 13, 2006 Share Posted February 13, 2006 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"><?phpforeach($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> Link to comment Share on other sites More sharing options...
aspnetguy Posted February 13, 2006 Share Posted February 13, 2006 change mysql_select_db("BusFile"); to @mysql_select_db("BusFile") or die("Unable to select database"); Chances are this is the line causing the problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now