I am working on a code that seems to be half functional... and I'm not sure why but the most likely cause is in the query checks if the cinfo field has any information in it but before I change anything a second opinion would be helpful. Code Below:
$user = addslashes($user);
$conn = db_conn();
$query = "select * from majestic where usernm = '$user' and cinfo = ''";
$result = mysql_query($query);
$numrows = mysql_num_rows($result);
if ($numrows == 0){
header("Location: /mphoto/majesticupload.php?error=1");
die();
}
After submiting some data that goes into the database the user has to pay before actually uploading photos and descriptions of the photos and to make sure it puts the photo text in the correct field it finds the row with their username and no data in the cinfo field. That way no data gets overwritten if the form is filled out twice and if it is the first time the data should get put into the correct row if the person has more than one. If no row exists then it will display an error. Not actually included in the code above is the database update since that does work. It is the $numrows==0 that seems to be what is returning the errors.
The problem is someone has filled this out and it is taking them to the error page, even though they have a user name and the cinfo field is empty. I've used the page several times and it does work for me and several other people have been able to fill it out aswell... The user that is having trouble appears to have the same type of browser that I do IE 6.0
Any help would be appriciated.