Hello,
Sorry if this is the wrong section to post.
I'm trying to create a small script but seem to be running into problems, can someone tell me if they see anything wrong with this code? I have a bridge between two databases, hence the mysql_connect.
Thanks.PHP Code:mysql_connect("****","****","******");
$sha_pass_hash = sha1(mysql_real_escape_string(strtoupper($vbulletin->userinfo['username'])) . ":" . mysql_real_escape_string(strtoupper($savepass)));
$query = mysql_query("SELECT count(*) FROM realmd.account WHERE username='{$vbulletin->userinfo[username]}'");
if(mysql_num_rows($query) > 0)
{
mysql_query("UPDATE realmd.account SET v=0,s=0,sha_pass_hash='$sha_pass_hash', email='{$vbulletin->GPC[email]}' WHERE username='{$vbulletin->userinfo[username]}'");
}
else
{
mysql_query("INSERT INTO realmd.account(username,sha_pass_hash, email, expansion) VALUES('{$vbulletin->userinfo[username]}', '$sha_pass_hash' ,'{$vbulletin->userinfo[email]}',2)");
}


LinkBack URL
About LinkBacks





