Reply to Update fails

Your name:

Reply:


Posted by Kevin Raleigh on 07/17/07 02:42

The following code seems to be failing. Can you check my logic?
I am using this //>> notation in the body of the code to indicate my
questions and
comments
$check = mysql_query("SELECT * FROM user WHERE id = '$userID'")or die("query
failed!");

//>> Gives error if user dosen't exist
//>> this should read if($check2==0) but it dosen't work??
//>>I always get the die message that user does not exist in the db
//>>I checked the db and the user is in the db

$check2 = mysql_num_rows($check);
if ($check2 == 0) {
die('That user does not exist in our database. ');
}



while($info = mysql_fetch_array( $check )){
$dbSecureID = stripslashes($info['secureID']);
$fName = stripslashes($info['fName']);
$lName = stripslashes($info['lName']);
//gives error if the password is wrong
}
if ($secureID != $dbSecureID) {

//>>this works but I can't figure how my userId fails and this passes?

die('This user has not registered yet!');
} else{

//>> why would this code fail it looks basic enough??
mysql_query("UPDATE user SET confirmIDFlag=1 WHERE id=$userID");

insight appreciated
thank you
Kevin Raleigh

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация