Re: Data not being inserted into a mysql db

From: Date: Sat, 09 Sep 2000 03:26:54 +0000
Subject: Re: Data not being inserted into a mysql db
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-2761@lists.php.net to get a copy of this message
At 7:41 AM +0700 09-09-2000, Stuart McDonald wrote:
I've got a simple form for entering data into a mysql db. Once the data is entered, the user is given a confirmation field and once confirmed it is written to the db. Yet, sometimes it does not actually write to the db. This happens on a seemingly random basis, and is very tedious. When I insert the information on my local machine, I have no problems. Could this be a connection related problem? Here is the form: ____start_____
[deleted]
____ends____ Any suggestions would be much appreciated. Stuart
You don't have *any* error checking on your query calls. Why not? Check the function call return values (mysql_query() in particular) and if they fail, call mysql_error() and/or mysql_errno() to print information about the error. If you're not going to check for errors, you're just flying blind. Printing the error messages may give you a clue. Perhhaps you're not sufficiently validating the input that you're inserting. -- Paul DuBois, paul@snake.net

« previous php.db (#2761) next »