<?php
session_start();
include('MySQL.php');
$Name = $_SESSION['Name'];
$Check = 'SELECT * FROM Users WHERE FName = "'.$Name.'"';
$Query = mysql_query($Check);
if($Row = mysql_fetch_assoc($Query))
{
$Admin = $Row['Admin'];
if($Admin == 1)
{
$ID = $_POST['ID'];
$Username = $_POST['User'];
$EMail = $_POST['EMail'];
$FName = $_POST['FName'];
$LName = $_POST['LName'];
$IP = $_POST['IP'];
$Active = $_POST['Active'];
$Admin = $_POST['Admin'];
mysql_query('UPDATE Users SET Username="'.$Username.'", EMail="'.$EMail.'", FName="'.$FName.'", LName="'.$LName.'", IP="'.$IP.'", Active="'.$Active.'", Admin="'.$Admin.'"');
$Val['Msg'] = 'Those Values Have Been Updated';
}
else
{
$Val['Re'] = 'Home.php';
}
}
echo json_encode($Val);
?>
每次我运行查询时都没有任何反应。我知道这不是我的 jQuery,所以不要担心,因为我检查了三次并且我的所有变量都很好。如果我将它们取下或戴上,MySQL 行标题周围的引号没有任何作用。我已经尝试了几个小时,但似乎找不到解决方法!