Skip to main content

Posts

Recent posts

Password Recovery (Reset) using PHP and MySQL

 Password Recovery (Reset) using PHP and MySQL Database CREATE TABLE `password_reset_temp` ( `email` varchar(250) NOT NULL, `key` varchar(250) NOT NULL, `expDate` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; db.php <?php // Enter your Host, username, password, database below. // I left password empty because i do not set password on localhost. $con = mysqli_connect("localhost","root","","register"); if (mysqli_connect_errno()){ echo "Failed to connect to MySQL: " . mysqli_connect_error(); die(); } date_default_timezone_set('Asia/Karachi'); $error=""; ?> index.php <?php ?> <html> <head> <title>Demo Forgot Password Recovery (Reset) using PHP and MySQL </title> <link rel='stylesheet' href='css/style.css' type='text/css' media='all' /> </head> <body> <div style="width:700px; margin:50 auto;"...