当前位置:编程学习 > php >>

php 往MYSQL 中插数据 怎么插不进去?

<?php $submit =$_POST["submit"]; $text =$_POST["text"]; $text1 =$_POST["text1"]; $text2 =$_POST["text2"]; $text3 =$_POST["radiobutton"]; $link_ID = mysql_pconnect('localhost','root',''); if(mysql_select_db('1000tou',$link_ID)){ //echo "OK"; }else{ echo "NG"; } session_start(); //判断是否刷新********************* if(isset($_POST['mark'])) { if($_POST['mark'] == $_SESSION['code']) { // 处理该表单的语句。。。 } else { // 处理刷新时的语句。。。 } } //END****************************** $code = mt_rand(0,1000000); $_SESSION['code'] = $code; ?> <form name=form1 method="post"> <p> <input type="text" name="text" /> <br> <input type="text" name="text1" /> <br> <input type="text" name="text2" /> <br> <input type="radio" name="radiobutton" value="nan" /> 男 <input type="radio" name="radiobutton" value="nv" /> 女<br> <label> <select name="select"> <option>123</option> <option>hang</option> <option>789</option> </select> </label><br> <input type="submit" name="submit" value="submit" /> <input type="hidden" name="mark" value="<?php echo $code;?>"> </p> </form>
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,