Jump to content


Photo

INPUT TYPES IN HTML FORM


  • Please log in to reply
1 reply to this topic

#1 benjamin_boothe

benjamin_boothe
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 21 August 2006 - 03:33 PM

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 ?>"/>

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 21 August 2006 - 03:38 PM

"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:

$query = "INSERT .... whatever your query is ....";
$result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query); // useful error message

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)
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users