Jump to content

INPUT TYPES IN HTML FORM


benjamin_boothe

Recommended Posts

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
Share on other sites

"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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.