PHP Classes

File: uploady/logic/forgetPasswordLogic.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   Uploady PHP Upload File to MySQL   uploady/logic/forgetPasswordLogic.php   Download  
File: uploady/logic/forgetPasswordLogic.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Uploady PHP Upload File to MySQL
Store file upload details in a MySQL database
Author: By
Last change: Update of uploady/logic/forgetPasswordLogic.php
Date: 11 months ago
Size: 744 bytes
 

Contents

Class file image Download
<?php

$tpl
= new Uploady\Template("template/emails");

$utils = new Uploady\Utils();

$database = new Uploady\Database();

$user = new Uploady\User($database, $utils);

if (
$_SERVER['REQUEST_METHOD'] == "POST") {
   
$username = isset($_POST['email']) ? $utils->sanitize($_POST['email']) : null;

   
$rp = new Uploady\ResetPassword($database, $user, $utils, $tpl);

    if (isset(
$username)) {
        if (
$rp->sendMessage($username)) {
           
$msg = $lang["general"]["forget_password_success"];
        } else {
           
$err = $lang["general"]["forget_password_failed"];
        }
    } else {
       
$err = $lang["general"]["no_valid_email"];
    }
}

$page = "forgetPassword";
$title = $lang["general"]['forget_password_title'];