Home > Backend Development > PHP Tutorial > javascript - 网页新建一个表单,怎么写数据提交到哪边的代码?

javascript - 网页新建一个表单,怎么写数据提交到哪边的代码?

WBOY
Release: 2016-06-06 20:26:09
Original
1107 people have browsed it

新手。
我在网页上写一个预约报名的表单,提交后的数据我要怎么看到呢,代码如何写?

回复内容:

新手。
我在网页上写一个预约报名的表单,提交后的数据我要怎么看到呢,代码如何写?

a.php

<code><form action="b.php" method="post">
    你的姓名:<input type="text" name="name" value="">
    <input type="submit" id="submit" value="提交">
</form>
</code>
Copy after login

b.php

<code><?php echo "您好:".$_POST['name'];
?></code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template