abubaker0000 Posted August 28, 2014 Share Posted August 28, 2014 hi I'm create a form and I connect it by database and when I submit the data the data is inserted correctly in the table ,but it's show me some wrings this is HTML code <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> </head> <body> <legend> <form action="cccccccccc.php" method="post"> <label>user name <input type="text" name="uname"> </label> <label>pasword <input type="password"name="pass"> </label> <input type="submit"> </form> </legend> </body> </html> and this is php code <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> </head> <body> <?php mysql_connect("localhost","root","")or die (mysql_error()); mysql_select_db("abubakerdb") or die (mysql_error()); $user=$_POST['uname']; $pass=$_POST['pass']; $query = mysql_query("insert into user_name (name , password)values('$user','$pass')")or die (mysql_error()); if($query) { echo $user ."is added"; } ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
Barand Posted August 28, 2014 Share Posted August 28, 2014 (edited) http://en.wikipedia.org/wiki/Deprecation You should change your code to use either the MySqli_ functions or PDO. You'll have to do sooner or later so may as well do it now. Edited August 28, 2014 by Barand Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.