Jump to content

Archived

This topic is now archived and is closed to further replies.

benjamin_boothe

INPUT TYPES IN HTML FORM

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

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

×

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.