Barand Posted March 19, 2007 Share Posted March 19, 2007 That's what the manual is for http://www.php.net/get_magic_quotes_gpc http://www.php.net/mysql_real_escape_string http://www.php.net/strip_tags Quote Link to comment Share on other sites More sharing options...
leisnerr Posted March 19, 2007 Author Share Posted March 19, 2007 Okay, I have some reading to do to get into it a little more advanced. But what was the problem with the code I wrote? Could you point out where my error is? I'm gonna try to learn as much as I can but I'm starting with w3s lol. Thanks. Quote Link to comment Share on other sites More sharing options...
Barand Posted March 20, 2007 Share Posted March 20, 2007 mysql_query("INSERT INTO Person (FirstName, LastName, Age) VALUES ('$_POST[firstname]', '$_POST[lastname]', '$_POST[age]')"); if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Information Added"; $sql is not defined. In my version I define $sql then call mysql_query(). You call mysql_query() then try to call it again with an undefined query string Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.