关于POST和GET的问题 ?php include("conn.php"); include("header.php"); $biaoti=$neirong=$tupian=$id=""; $id=$_GET['id']; $sqlll="select*fromnewswhereid=".$id; $res=mysql_query($sqlll); $row=mysql_fetch_row($res); echo"+++++".$_GET['id']; if(i
关于POST和GET的问题
<br /> <?php<br /> <br /> include("conn.php");<br /> include("header.php");<br /> <br /> $biaoti=$neirong=$tupian=$id="";<br /> $id=$_GET['id'];<br /> $sqlll="select * from news where id =".$id;<br /> $res=mysql_query($sqlll);<br /> $row=mysql_fetch_row($res);<br /> echo "+++++".$_GET['id'];<br /> <br /> if(isset($_POST['submit'])){<br /> global $id;<br /> echo "++++".$id;<br /> $kzm=pathinfo($_FILES['tupian']['name']);<br /> date_default_timezone_set('Asia/Shanghai');<br /> $fileName1=date(Ymd_Gis);<br /> $fileName='upload/'.$fileName1.'.'.$kzm['extension'];<br /> move_uploaded_file($_FILES['tupian']['tmp_name'],$fileName);<br /> <br /> if(empty($kzm['extension'])){<br /> global $id;<br /> echo "+++++".$id;<br /> $sql="UPDATE news SET (biaoti,neirong,riqi) =('$_POST[biaoti]','$_POST[neirong]',now()) WHERE id =".$id;<br /> }else{<br /> $sql="UPDATE news【本文来自鸿网互联 (http://www.68idc.cn)】 SET (biaoti,neirong,tupian,riqi) =('$_POST[biaoti]','$_POST[neirong]','$fileName',now()) WHERE id =".$id;<br /> }<br /> <br /> mysql_query($sql);<br /> <br /> }<br /> <br /> <br /> <br /> ?><br />