这意味着从 URL 获取数据并将其提交到数据库,它会给出错误:查询为空;
我在那里放了一些东西来测试,是的,它给出了我设置的变量的值。提前致谢
<?php
require 'variables.php';
if(empty($_REQUEST['Key']) || empty($_REQUEST['Computer']) || empty($_REQUEST['Panel'])){
die("Nothing was given for me to give back :(");
}else{
$key = $_REQUEST['Key'];
$computer = $_REQUEST['Computer'];
$panel = $_REQUEST['Panel'];
$insertquery = mysql_query("INSERT INTO keys (Key, PC, Panel) VALUES ('".$key."', '".$computer."', '".$panel."')");
$sql = mysql_query($insertquery);
if($sql){
echo "good ". mysql_error();
}else{
echo "bad ". mysql_error();
echo "<br />".$key." ".$computer." ".$panel."";
}
}
?>