my sql insert query not working

Posted by Piyush on Stack Overflow See other posts from Stack Overflow or by Piyush
Published on 2010-05-18T07:47:33Z Indexed on 2010/05/18 7:50 UTC
Read the original article Hit count: 183

Filed under:
|

I am inserting userId.It is displaying correct but inserting 0 in spite of actual userId. mycode-

If(! empty($userIDToCheck) || $userIDToCheck != '' )

{ echo $userIDToCheck;
$sql = "INSERT INTO
pnpdb.ruser(userid) VALUES ('$userIDToCheck');";
mysql_query($sql)or die(mysql_error());
echo "Done";
}

Output : pi203713 Done

But is database it is inserting "0"???

© Stack Overflow or respective owner

Related posts about mysql

Related posts about php