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

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

WBOY
WBOYOriginal
2016-06-06 20:26:091074browse

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

回复内容:

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

a.php

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

b.php

<code><?php echo "您好:".$_POST['name'];
?></code>
Statement:
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