View file 3.php

File size: 1.01Kb
<?php
include "head.php";

   if(isset($_POST['name']))
 {
$name = trim($_POST['name']);
 }

   if(isset($_POST['mmail']))
 {
$mmail = trim($_POST['mmail']);
 }

$mmail = addslashes(trim(htmlspecialchars(stripslashes(chop($mmail)))));

if (empty($name) || empty($mmail))
{
echo "Пусто? Класс!";
echo '<meta http-equiv="refresh" content="2; url=mipass.php">';   
}
else
{
if(file_exists("xxx/m/$name.dat"))
{
   $myFiles = "xxx/m/$name.dat";
   $mm = implode('', file($myFiles));

  if($mm==$mmail)
 {

   $myFilesxx = "users/$name.dat";
   $password = implode('', file($myFilesxx));

echo'Привет '.$name.'! Не теряйте больше свой пароль '.$password.'<br><a href="hello.php">Главная</a>!';
 }else{
 echo'Данные несовпадают!';
echo '<meta http-equiv="refresh" content="2; url=hello.php">';
 }


 }else{
echo'Ошибка в имени!';
echo'<meta http-equiv="refresh" content="2; url=hello.php">';
}
}
include "foot.php";
?>