douwei7501 2011-12-29 22:55
浏览 48
已采纳

PHP - 以3种形式传递变量 - Step1,Step2和Step3 [关闭]

I'm trying to create a form with 3 steps.
1. Filling in the information.
2. Confirmation of information in 1 step.
3. Send email

Whenever I submits the confirmation form, I will receive an email without contents I filled in in Form 1.

Here are the codes:

index.php

<?php
<form id="entry" action="confirm.php" method="post">
<input type="text" name="school" id="school" />
<input type="submit" value="Next Step">
</form>
?>

confirm.php

<?php
<form id="entry" action="thankyou.php" method="post">
<? echo $_POST["school"] ?>
</form>
?>

thankyou.php

<?php
$subject = "Subject";
mail("YourEmail@gmail.com", $subject, $_POST["school"], "From: Testing" );
?>

Any help with be appreciated!

  • 写回答

1条回答 默认 最新

  • dsqa6272 2011-12-29 23:02
    关注

    form 3 is incorrect, should be: mail("YourEmail@gmail.com", $subject, $_POST["school"], "From: Testing" ); $_POST["school"].

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题