include("config.php");
$From=$_POST['Kname'];
$User=$_POST ['Qtime'];
$Skind=$_POST['Ytime'];
$Belong=$_POST['Xname'];
if($From!=""){
$sql="INSERT INTO server(id,From,User,Skind,Belong ) VALUES ('','$From','$User','$Skind','$Belong')";
if(mysql_query($sql)){
echo"";
}
else{
echo "Upload failed!";
}
}else
{
echo "The data is empty";
}
?>
The above cannot be solved by adding data to the database
First check to see if the form value has been passed. If so, print the SQL statement to see if there are any syntax errors.