benjamin_boothe Posted August 21, 2006 Share Posted August 21, 2006 I keep getting 'Error inserting data' whenever I try to send data from my form to my db. It has got to be a character type error on the db because I was able to add a record to the table manually. So, it must be something to do with my HTML code. I have used OPTION (SELECT SIZE) fields as well as TEXT (INPUT TYPE) fields.For the VALUE tag I am putting in e.g. VALUE="<? echo $fn ?>"/> Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 21, 2006 Share Posted August 21, 2006 "Error inserting data" isn't a helpful error message at all since it provides no useful information.I'd suggest getting into the habit of using useful error messages such as:[code]$query = "INSERT .... whatever your query is ....";$result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query); // useful error message[/code]Try a variant of that in your own code and post the actual results you get (unless it's so obvious you can fix the problem immediately) 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.