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 ?>"/> Link to comment https://forums.phpfreaks.com/topic/18200-input-types-in-html-form/ 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) Link to comment https://forums.phpfreaks.com/topic/18200-input-types-in-html-form/#findComment-78125 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.