PHP Classes

File: forgot_password.php

Recommend this page to a friend!
  Classes of Olaf Lederer  >  Access user Class  >  forgot_password.php  >  Download  
File: forgot_password.php
Role: Application script
Content type: text/plain
Description: Example for a password recovery
Class: Access user Class
Site user registration and page access restriction
Author: By
Last change: changed variables (example: $PHP_SELF to $_SERVER['PHP_SELF'])
Date: 11 years ago
Size: 1,295 bytes


Class file image Download

$renew_password = new Access_user;

if (isset(
$_POST['Submit'])) {
$error = $renew_password->the_msg;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Forgot password page example</title>
<style type="text/css">
label {
    display: block;
    float: left;
    width: 110px;

<h2>Forgot your password/login?</h2>
<p>Please enter the e-mail address what you have used during registration.</p>
<form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  <label for="email">E-mail:</label>
  <input type="text" name="email" value="<?php echo (isset($_POST['email'])) ? $_POST['email'] : ""; ?>">
  <input type="submit" name="Submit" value="Submit">
<p><b><?php echo (isset($error)) ? $error : "&nbsp;"; ?></b></p>
<!-- Notice! you have to change this links here, if the files are not in the same folder -->
<p><a href="<?php echo $renew_password->login_page; ?>">Start</a></p>