致命错误:函数名称必须是第3行C {\ xampp \ htdocs \ CreateAccountT.php中的字符串

时间:2015-09-03 08:01:51

标签: php database login unity3d

致命错误:函数名称必须是第3行的C:\ xampp \ htdocs \ CreateAccountT.php中的字符串

<?php
  //Email and Password
  $Email = $_REQUEST("Email");
  $Password = $_REQUEST("Password");

  //PHP Only
  $Hostname = "localhost";
  $DBName = "accounts";
  $User = "root";
  $PasswordP = "";

  mysql_connect($Hostname, $User, $PasswordP) or die("Can't connect to DB");
  mysql_select_db($DBName) or die("Can't Connect to DB");

  if(!$Email || !$Password){
    echo"Empty";
  }else{ 
    $SQL = "SELECT * FROM accounts WHERE Email = '" . $Email ."'";
    $Result = @mysql_query($SQL) or die("DB Error");
    $Total = mysql_num_rows($Result);
    if($Total == 0){
        $insert = "INSERT INTO 'accounts' ('Email', 'Password') VALUES ('" . $Email . "', MDS('" . $Password . "'), 0)";
        $SQL1 = mysql_query($insert);
        echo"Success";
    }else{
        echo"AlreadyUsed";
    }
  } // End Main Else

  mysql_close();
?>

问题是什么?

2 个答案:

答案 0 :(得分:1)

$_REQUEST("Email")应为$_REQUEST["Email"]

$_REQUEST("Password")应为$_REQUEST["Password"]

答案 1 :(得分:0)

使用[ INSTEAD OF (

$Email = $_REQUEST["Email"];
$Password = $_REQUEST["Password"];