• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Php lost password script need fast help

Slex

New Member
Joined
Mar 19, 2012
Messages
30
Reaction score
0
Hello i have been working for hours to make this script working. I want it check so the username, name, mail and code is true. If all is true it will show the password from the user and if not it will show a message like Something is wrong!

This is the script
PHP:
<b>Forgot Password</b> 
<?php
if (isset($_POST['submit'])){
$user = $_POST['user'];
$email = $_POST['email'];
$name = $_POST['name'];
$code = $_POST['code'];
$pass = $_GET['pass'];
$sql = "SELECT * FROM users WHERE email='$email' AND name='$name' AND code='$code' AND
user='$user' AND pass='$pass'";
if(!mysql_query($sql))
{
echo "Något är fel! ".mysql_error();
}
else
{
echo "Your Password is ".$pass."!";
}}
?>
<html>
<body>
<tr>
<form action="?p=lostpassword" method="post">
        <td><br>Username:<br></td>
        <td><input type="text" input type="text" name="user" value=""></td>
</tr>
<tr>
        <td><br>Mail:<br></td>
        <td><input type="text" name="email" value=""></td>
</tr>
<tr>
        <td><br>Name:<br></td>
        <td><input type="text" name="name" value=""></td>
</tr>
<tr>
        <td><br>Secret Code:<br></td>
        <td><input type="text" name="code" value=""></td>
</tr>
<tr> 
 <td>
 <tr>
 <br>
  <input type="submit" name="submit" value="Get Password"> 
</td>
</tr>
 
</table>
</form>
<br>
<br>
</html>
</body>

This is the errors
PHP:
Notice: Undefined index: pass in C:\xampp\htdocs\pages\lostpassword.php on line 8
Your Password is !
 
Back
Top