Search code examples
phpmysqlhtmlmysqlimobile-browser

Running web in Android browser


I have a problem running this script in Android browser.

<?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  
?>  

It is working well on a PC but not in Android browser. The page is at http://qec.890m.com/performa.html (on submit php script).


Solution

  • It looks like the link-tag around your submit button is the problem.

    Replace:

    <a href "thank.html"  > <input class=" btn-block btn-primary"   name="Submit" height="69" type="submit" ></a>
    

    With:

    <input class=" btn-block btn-primary"   name="Submit" height="69" type="submit" >