を行う他死ぬ私は、単純なIF
を作るしようとしています:PHP5/MYSQL - VALUE1のIF = value2のは、コード
IF $un = mysql_result
die
else
do some code.
これは、同じ名前を持つ複数のユーザーを防ぐために、プロセス・フォームのためです。
$UN
は、登録フォームからPHPの冒頭で宣言された変数です。あなたのif
状態で
if ($result = '$UN') {
$errorMessage = "Name has been Taken";
echo "User name is allready being Used, ";
$_SESSION['ERRMSG_ARR'] = $errormessage;
echo " Please Go Back and Try Again";
//header("Location: register.php");
exit();
}
else {
echo "not taken -- ";
}
私はif($ result === $ UN){ともう一つの解決策 "if($ result == '$ UN"){両方とも不正確な値を返します –
'if($ result == $ UN) $ UN) '? – AbdullahC