我在Android浏览器中运行此脚本时遇到问题。
<?php
$host= "localhost"; //yout host name
$username= "root"; //yout user name
$password= ""; // your password
$db_name= "qec"; // your database name
$con=mysql_connect("$host", "$username", "$password")or die("cannot connect"); //mysql connection
mysql_select_db("$db_name")or die("can not select DB"); //select your database
error_reporting(E_ALL ^ E_NOTICE);
$depart = $_POST['depart'];
$degree = $_POST['degree'];
$semester = $_POST['semester'];
$study_year = $_POST['study_year'];
$faculty = $_POST['faculty'];
$query = "INSERT INTO p1 (depart,degree,semester,study_year,faculty) VALUES ('$depart', '$degree', '$semester', '$study_year', '$faculty')";
mysql_query($query) or die('Query "' . $query . '" failed: ' . mysql_error());
// name, email and address are fields of your fields; test your table. $name, $email and $address are values collected from the form
?>
它在PC上运行良好但在Android浏览器中运行良好。该页面位于http://qec.890m.com/performa.html(提交php脚本)。
答案 0 :(得分:0)
看起来提交按钮周围的链接标记就是问题所在。
替换:
<a href "thank.html" > <input class=" btn-block btn-primary" name="Submit" height="69" type="submit" ></a>
使用:
<input class=" btn-block btn-primary" name="Submit" height="69" type="submit" >