如何使用php在同一个按钮中创建多个函数或活动?
我正在使用PHP开发一个允许用户登录系统的网站。但我不知道当用户点击登录按钮时会出现什么问题,该按钮停留在同一页面而不直接进入下一页面 你能帮我找出问题的原因吗? 提前谢谢你如何使用php在同一个按钮中创建多个函数或活动?,php,web,Php,Web,我正在使用PHP开发一个允许用户登录系统的网站。但我不知道当用户点击登录按钮时会出现什么问题,该按钮停留在同一页面而不直接进入下一页面 你能帮我找出问题的原因吗? 提前谢谢你 巴朱代客 @导入url(http://fonts.googleapis.com/css?family=Raleway:400,700); 身体{ 背景:#7f9b4e url(img/v1.jpg)无重复中心顶部; -webkit背景尺寸:封面; -moz背景尺寸:封面; 背景尺寸:封面; } .容器>收割台h1, .
巴朱代客
@导入url(http://fonts.googleapis.com/css?family=Raleway:400,700);
身体{
背景:#7f9b4e url(img/v1.jpg)无重复中心顶部;
-webkit背景尺寸:封面;
-moz背景尺寸:封面;
背景尺寸:封面;
}
.容器>收割台h1,
.容器>标题h2{
颜色:黑色;
文本阴影:0 3px 3px rgba(0,0,0,0.7);
}
欢迎来到巴朱瓦莱酒店
登录
电邮:
密码:
我不知道为什么您有多个
标记,但根据我从您的代码中推断的情况,您可能正在寻找类似以下内容:
<html lang="en">
<head>
<title>bAJu VALeT </title>
<style>
@import url(http://fonts.googleapis.com/css?family=Raleway:400,700);
body {
background: #7f9b4e url(img/v1.jpg) no-repeat center top;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
}
.container>header h1,
.container>header h2 {
color: black;
text-shadow: 0 3px 3px rgba(0, 0, 0, 0.7);
}
</style>
</head>
<body>
<div class="container">
<header>
<center>
<h1><strong>WELCOME TO</strong>BAJUVALET</h1>
</center>
</header>
<center>
<section class="main">
<h1>LOGIN</h1>
<p></p>
<form id="login" class="form-signin" role="form" method="POST" action="order.php">
<table border="1" cellpadding="">
<tr>
<td><h2>Email:</h2></td>
<td><input type="text" name="email"></td>
</tr>
<tr>
<td><h2>Password:</h2></td>
<td><input type="text" name="password"></td>
</tr>
<tr>
<td colspan="2">
<center>
<input type="submit" name="continue" value="CONTINUE">
</center>
</td>
</tr>
</table>
</form>
<a href="signup.php">
<h6>Don't have an account? <strong>Sign Up</strong></h6>
</a>
<p></p>
</section>
</div>
</body>
现在,一些需要时刻牢记的重要建议:
记住关闭打开的标记,这是一个很好的实践,可以在代码增长时节省大量时间
使用适当的缩进,可以使代码更易于阅读,从而提高生产率
搜索您试图学习的内容的文档,在本例中,查找“html表单文档”可以帮助您解决问题并了解正在发生的事情
有用链接:
你能发布你的代码片段吗?发布你的代码。很可能您丢失了
,我已经添加了我的代码片段@shantanuPlease,如果我的回答令人满意并对你有所帮助,请接受我的回答,否则,请告诉我我可以如何帮助你更多!!!谢谢@Mateus为您抽出时间!。我将尝试用您的代码改进我以前的代码。:)
<?php
$email = $_POST["email"];
$password = $_POST["password"];
echo "Email: ".$email." Password: ".$password.".<br/>";
?>