@ mysql_query("update Booking set Re=$Re where BookingId='$BookingId'") || error('不能修改!');

解决方案 »

  1.   

    if($submit)    //如果用户安下了提交
    {
        if(!$Re) $Re = 0;//如果$Re值为空.SQL语句就是错的.
        @ mysql_query("update Booking set Re=$Re where BookingId='$BookingId'") || error('不能修改!');} 
    =====
    另:表单传值 最好用$_POST,$_GET数组.
      

  2.   

    if($submit) //如果用户安下了提交{
    echo $BookingId;
    @ mysql_query("update Booking set Re='$Re' where BookingId='$BookingId'") || error('不能修改!');} 当安下提交后 ,"echo $BookingId ;"都不输出值,说明当安下"提交"按钮后,变量"$BookingId"值就不再保留.