[英]how do i make a submit button link to another page
我需要帮助我的网站的人。 我现在已经准备好了网站,但我无法保存提交按钮并重定向到提交的注册页面,这是我的全部代码:
<h1> Welcome to the Registration Page <h1> <form> First name:<br> <input type="text" name="First Name"><br> Middle name:<br> <input type="text" name="Middle Name"><br> Last name:<br> <input type="text" name="Last Name"><br> Gender: <br> <input type="radio" name="gender" value="male" checked> Male<br> <input type="radio" name="gender" value="female"> Female<br> <input type="radio" name="gender" value="other"> Other<br> Email Address:<br> <input type="text" name="Email Address"><br> Password:<br> <input type="text" name="Password"><BR> Confirm Password:<br> <input type="text" name="Password Confirmation"><br> Referral Account:<br> <input type="text" name="Referal"> <input type="submit" value="Submit"> </form>
我不知道在代码中放什么来保存记录并重定向到另一个页面
您可能需要带有要重定向的页面的action
属性。
<form method="POST" action="another_page.html"></form>
并且有很多方法可以提交表单和重定向。 您可能想了解 PHP 和/或 Ajax。
另外,如果你想在数据库上存储记录,你应该学习 PHP 和数据库交互的 SQL 查询。
您可以参考此链接。
或者你可以简单地如果你有 php 文件:
<form method="POST" action="handler.php">
<input type="submit" value="Submit" onclick="window.location = 'another_page.html'">
</form>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.