2017-09-04 52 views
0

PHPエラーについて助けが必要です。ユーザーをリダイレクトする管理者のバックエンドを作成する方法を知る方法がわからないので、ここでフォームのログイン入力で別のページにリダイレクトしますデータベースを経由して別のページに、ここでのコードの下に確認してください別のページユーザー名とパスワードが正しい場合、別のページにリダイレクト

<?php $userid = $_POST['userid']; 
    $userpass = $_POST['password']; 

    if (strcmp($userid, "3495062250") && strcmp($password, "12smith00")) { 
    header('location: account-dashboard/client_349506_2243/index.html'); 

    } else{ header('location: error.html'); } ?> 
+0

<?phpの $ユーザーID = $ _POST [」でequal operatorを使用して文字列を比較することができてユーザーID']; $ userpass = $ _POST ['password']; if(strcmp($ userid、 "3495062250")&& strcmp($ password、 "12smith00")) { ヘッダー( 'location:account-dashboard/client_349506_2243/index.html'); } \t else {header( 'location:error.html'); \t} ?> – Kingx

+1

ご質問の中にコメントに含まれないようにしてください –

+0

[PHPログインページリダイレクト]の複製が可能です(https://stackoverflow.com/questions/19782194/php-login-page-redirect) –

答えて

0

にリダイレクト私のPHP

SCRIPT

//です。

あなたは間違いを犯しました。

  • あなたの代わりに$userpass
  • $passwordを使用している状態ならばあなたは、単にPHP

    $userid = $_POST['userid']; 
    $userpass = $_POST['password']; 
    if ($userid = "3495062250" && $userpass == "12smith00") { 
        header('location: account-dashboard/client_349506_2243/index.html'); 
    } else { 
        header('location: error.html'); 
    } 
    
関連する問題