Jazzy 1012
asked on
Php variable to be sent back
I have this code to send an email to the user:
How can I make the email be sent back to the previous page so it can say it has been sent back to jasmine@hotmail.com
if(!empty($email)){
$q_check = "SELECT * FROM users WHERE email = '$email'";
$check = mysqli_query($conn,$q_check);
$row = mysqli_fetch_array($check);
$name = $row['first_name'];
$createdat= date("Y-m-d H:i:s");
if($row)
{
$res = mail ($email, $subject, $body,$headers);
header("Location: index.php/?a=1");
//echo "Please check your email";
}
How can I make the email be sent back to the previous page so it can say it has been sent back to jasmine@hotmail.com
<?php
if($_GET['i'] == 1)
{?>
<p style= 'color: red'>A reset email has been sent to </p>
<?php
}
if($_GET['i'] == 2)
{
echo " <p style= 'color: red'>The email you entered in invalid</p>";
}
?>
Instead of doing this use the session.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.