请告诉我我做错了什么。我认为可能存在$_POST
错误,但我是PHP的新手,只需要一只手。
<?php
include("config.php");
if(isset($_POST['submit']))
{
$medical=$_POST['medicalin'];
if($medical=='')
{
echo"<script>alert('Please enter some Medical Information, if there is none to report, simply type N/A.')</script>";
exit();
}
//updating
$query = "UPDATE test SET medical= '$medical' WHERE id=".$user['id'];
if(mysql_query($query)) {
echo"<script>window.open('/success','_self')</script>"; }
else {
echo "There was an error updating your medical information, please contact us immediately.";}
}
?>