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> Link to comment https://forums.phpfreaks.com/topic/290707-php-error/ Share on other sites More sharing options...
Barand Posted August 28, 2014 Share Posted August 28, 2014 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. Link to comment https://forums.phpfreaks.com/topic/290707-php-error/#findComment-1489193 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.