请告诉我我做错了什么。我想可能有 $_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.";}
}
?>
暂无答案!
目前还没有任何答案,快来回答吧!