So I've created a form where users could send some requests. The request will be stored in the database and will be sent through the email as well.
Here's what the viewing page of the requests looks like:
And this is what it looks like on email:
(These are two different request, just wanted to show you guys what it would look like.)
Anyway, what I wanted to happen is to add a link on the email where it would show the viewing page of the requests. (1st pic)
But here's the thing, on the form, I have a log in page where users would have to log in before they can view the requests page.
So is it possible to add a link on the email where it would redirect the user to the viewing of the requests page, and of course it should automatically log in when clicked.
Here's the form to email code:
$email_from = "PC Request";//<== update the email address
$email_subject = "PC Request for $account";
$email_body = "Here are the specifications:\n\n".
"Requested by: $reqname\n".
"Start Date: $month/$day/$year\n".
"Employee Name: $empname\n".
"Position: $position\n".
"Account: $account\n".
"Platform: $platform\n".
"Processor: $processor\n".
"RAM: $ram\n".
"Monitor: $monitor\n".
"Phone: $phone\n".
"Phone Type: $phonetype\n".
"Headset: $headset\n".
$to = "email@email.com";//<== update the email address
$headers = "From: $email_from \r\n";
//$headers .= "Reply-To: $visitor_email \r\n";
//Send the email!
mail($to,$email_subject,$email_body, $headers);
//done. redirect to thank-you page.
//header('Location: index.php');
echo "<script>alert('Successfully sent!'); window.location='index.php'</script>";
}
}
?>