Fix issue on question.php -> Need to check email
This commit is contained in:
parent
829b392bca
commit
7e7b77769f
3 changed files with 12 additions and 15 deletions
|
|
@ -58,26 +58,19 @@ if (isset ($_POST['send']))
|
|||
|
||||
// Get an email from the list
|
||||
|
||||
echo 'Mail of user : ' . $_POST['email'];
|
||||
echo 'Mail of user : ' . $_POST['email'] . "<br/>";
|
||||
|
||||
$file = fopen('email.txt', 'r');
|
||||
$number = fgets($file);
|
||||
|
||||
while (true)
|
||||
$random = rand(1, $number);
|
||||
|
||||
for ($i = 0; $i < $random; $i++)
|
||||
{
|
||||
$random = rand(1, $number);
|
||||
|
||||
for ($i = 0; $i < $random; $i++)
|
||||
{
|
||||
$line = fgets($file);
|
||||
}
|
||||
|
||||
if ($line != ($_POST['email'])
|
||||
{
|
||||
break;
|
||||
}
|
||||
$line = fgets($file);
|
||||
}
|
||||
echo 'Adresse mail: ' . $line;
|
||||
|
||||
echo 'Adresse mail: ' . $line . "<br/>";
|
||||
fclose($file);
|
||||
|
||||
/* This code works, perhaps should be placed in a method in Question class?
|
||||
|
|
|
|||
Reference in a new issue