Forum Moderators: coopster

Message Too Old, No Replies

MySQL Question

I have 2 fields that my form won't populate

         

bumpaw

8:41 pm on Jan 26, 2004 (gmt 0)

10+ Year Member



I can log on to the database and add to the two problem fields, but when I use my form they won't add. There are around 14 more fields on the form that work fine. I have looked over the code to see what the difference is, but none can be seen. I have stared at the table in phpmyadmin and can't see anything different about those two columns. Does anyone have a clue which direction to search in?

Timotheos

8:57 pm on Jan 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld!

You can go ahead and post the relevant code. Here's the guidelines [webmasterworld.com].

BitBanger

12:29 am on Jan 27, 2004 (gmt 0)

10+ Year Member



If you are using associtive arrays, the proper capitalization is necessary. MySQL is not case sensitive with field names, where PHP is. This can cause all sorts of sutble errors to creap in. Best suggestion is to always assume everything is case sensitive.

figment88

12:35 am on Jan 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



while doing diagnostics, make sure you echo back your sql statement and mysql errors

echo "$sql<br>" . mysql_errno() . ": " . mysql_error() . "<br><br>";

Birdman

12:37 am on Jan 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To debug, just print() your sql query to the page and then, if you don't see the error, paste the query into phpMyAdmin for a better explanation.

I have a feeling it could be quotes, as I have had major probs with them too.

bumpaw

1:37 am on Jan 27, 2004 (gmt 0)

10+ Year Member



Thanks for all the help. You all gave me reason to look harder and I found the problem.


$contact_first=addslashes($conatact_first);
$contact_second=addslashes($conatact_second);

contact vs conatact Two extra a's and all that trouble. Thanks again! :)