我有我的网页表单并提交时,需要用户到另一个网页在我的网站。 我想通过进入到下一个页面的表单数据,喜欢的东西:
<?php echo $email; ?>
其中$email
是用户在表单中输入的电子邮件地址。 究竟如何我做到这一点?
我有我的网页表单并提交时,需要用户到另一个网页在我的网站。 我想通过进入到下一个页面的表单数据,喜欢的东西:
<?php echo $email; ?>
其中$email
是用户在表单中输入的电子邮件地址。 究竟如何我做到这一点?
来完成,最好的办法是使用POST这是超文本传输协议的一个方法https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
的index.php
<html>
<body>
<form action="site2.php" method="post">
Name: <input type="text" name="name">
Email: <input type="text" name="email">
<input type="submit">
</form>
</body>
</html>
site2.php
<html>
<body>
Hello <?php echo $_POST["name"]; ?>!<br>
Your mail is <?php echo $_POST["mail"]; ?>.
</body>
</html>
产量
你好“名”!
您的电子邮件是“whatyou@addedonindex.com”。