lundi 11 juillet 2016

INSERT INTO MySQL does not work for some users

I use this simple code to insert new rows to the database. It works fine from the majority of users' sides/browsers (95%). The strange thing is that it does not work from the side of many users and no rows added when they submit the form. My question is: What is the possible reason(s) that make this server side script does not work in some browsers?

//--SAVE DATA to MySQL Code --
    $username = "xxxxxxxx";
    $password = "xxxxxxxx";
    $dbName= xxxxxxxxxxxx;
    $con = mysql_connect("localhost", $username, $password);        
    mysql_select_db("$dbName", $con);                                           
    mysql_query("INSERT INTO pages (username, name, title, desci)  VALUES ('$username', '$name', '$title', '$desc')");  

    mysql_close($con);
//--END MySQL Code --

Aucun commentaire:

Enregistrer un commentaire