【发布时间】:2023-03-15 13:44:01
【问题描述】:
嗨,我正在从页面中获取值并在第二页中获取值,但我必须在 url 中发送值
<?php
session_start();
$_SESSION["email_address"] = $_REQUEST["email_address"];
echo "Favorite color is " . $_SESSION["email_address"] . ".<br>";
//$errors = '';
$myemail = 'info@abcdef.com';//<-----Put Your email address here.
$to_go="abcdef@gmail.com";
$to = $to_go;
$email_subject = "Contact form submission: aaname";
$email_body = "You have received a new message. ".
" Here are the details: Kindly <a href='localhost/ci/email_wait.php?email_address='.echo $email_address.'&password'=.$password.'>
Click Here</a> to reset your password";
$headers = "From:". $myemail;
$headers .= "Reply-To: $email_address";
mail($to,$email_subject,$email_body,$headers);
//redirect to the 'thank you' page
echo "Mail Sent. Thank you we will contact you shortly.";
?>
注意:此代码不适用于本地主机。
【问题讨论】: