php——学习笔记,验证密码是否一致,使用print_r以及colspan表情
来源:互联网 发布:java检测内存泄露 编辑:程序博客网 时间:2024/04/29 23:08
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>验证两次输入的密码是否相等</title>
</head>
<body>
<table width="409" border="2" cellpadding="20" cellspacing="2" bordercolor="#9900FF"bgcolor="#3366FF">
<form name="form1" method="post" action="">
<tr align="center">
<td height="24" colspan="20" class="style1"> 验证两次输入的密码是否相等 </td>
</tr>
<tr>
<td width="108" height="20" align="center" class="style1">用户名:</td>
<td width="295" class="style3"><input name="username" type="text" id="username" size="20" maxlength="50"></td>
</tr>
<tr>
<td height="20" align="center" class="style1">密码:</td>
<td class="style3"><input name="password" type="password" id="password" size="20" maxlength="50">
<span class="STYLE4">* 密码不能为空</span></td>
</tr>
<tr>
<td height="18" align="center" class="style1">密码确认:</td>
<td class="style3"><input name="password1" type="password" id="password1" size="20" maxlength="50">
<span class="STYLE4">* 确认密码不能为空</span> </td>
</tr>
<tr>
<td height="37" align="center"> </td>
<td ><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</form>
</table>
<table border="1">
<tr>
<th>www.dreamdu.com</th>
<th>.com域名的数量</th>
<th>.cn域名的数量</th>
<th>.net域名的数量</th>
</tr>
<tr>
<td>2003年</td>
<td>1000</td>
<td colspan="2">2000+3000</td>
</tr>
<tr>
<td>2004年</td>
<td>4000</td>
<td>5000</td>
<td>6000</td>
</tr>
<tr>
<td>2005年</td>
<td>7000</td>
<td>8000</td>
<td>9000</td>
</tr>
<tr>
<td>总数</td>
<td colspan="3">24000</td>
</tr>
</table>
</body>
</html>
<?php
if(!empty($_POST["Submit"]))
{
$password=$_POST["password"];
$password1=$_POST["password1"];
if($password==$password1)
{
echo "注册成功!";
}
else
{
echo "两次输入的密码不一致!";
}
}
$_POST是一个数组,里面包含着所有post到服务器的值,而这些值的名字就是你写的name名
$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x','y','z'));
print_r ($a);
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>验证两次输入的密码是否相等</title>
</head>
<body>
<table width="409" border="2" cellpadding="20" cellspacing="2" bordercolor="#9900FF"bgcolor="#3366FF">
<form name="form1" method="post" action="">
<tr align="center">
<td height="24" colspan="20" class="style1"> 验证两次输入的密码是否相等 </td>
</tr>
<tr>
<td width="108" height="20" align="center" class="style1">用户名:</td>
<td width="295" class="style3"><input name="username" type="text" id="username" size="20" maxlength="50"></td>
</tr>
<tr>
<td height="20" align="center" class="style1">密码:</td>
<td class="style3"><input name="password" type="password" id="password" size="20" maxlength="50">
<span class="STYLE4">* 密码不能为空</span></td>
</tr>
<tr>
<td height="18" align="center" class="style1">密码确认:</td>
<td class="style3"><input name="password1" type="password" id="password1" size="20" maxlength="50">
<span class="STYLE4">* 确认密码不能为空</span> </td>
</tr>
<tr>
<td height="37" align="center"> </td>
<td ><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</form>
</table>
<table border="1">
<tr>
<th>www.dreamdu.com</th>
<th>.com域名的数量</th>
<th>.cn域名的数量</th>
<th>.net域名的数量</th>
</tr>
<tr>
<td>2003年</td>
<td>1000</td>
<td colspan="2">2000+3000</td>
</tr>
<tr>
<td>2004年</td>
<td>4000</td>
<td>5000</td>
<td>6000</td>
</tr>
<tr>
<td>2005年</td>
<td>7000</td>
<td>8000</td>
<td>9000</td>
</tr>
<tr>
<td>总数</td>
<td colspan="3">24000</td>
</tr>
</table>
</body>
</html>
<?php
if(!empty($_POST["Submit"]))
{
$password=$_POST["password"];
$password1=$_POST["password1"];
if($password==$password1)
{
echo "注册成功!";
}
else
{
echo "两次输入的密码不一致!";
}
}
$_POST是一个数组,里面包含着所有post到服务器的值,而这些值的名字就是你写的name名
$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x','y','z'));
print_r ($a);
?>
0 0
- php——学习笔记,验证密码是否一致,使用print_r以及colspan表情
- js验证页面两个密码是否一致
- js验证 两次密码是否一致
- TP5 验证两次输入密码是否一致
- PHP 实现判断密码两次是否一致
- javascript实现不用弹出窗口验证两次密码是否一致
- 利用正则表达式验证两次密码是否一致
- easyui-validatebox 验证两次密码是否输入一致
- easyui-validatebox 验证两次密码是否输入一致
- 如何实现表单提交时,验证两次密码是否一致
- js验证两次输入的密码是否一致
- js验证两次输入的密码是否一致
- jQuery如何验证两次输入的密码是否一致
- jquery验证两次密码是否一致并阻止表单提交
- angularjs表单验证,包括密码长度及两次密码输入是否一致
- easyui验证两次密码一致
- 验证两个文件是否一致
- jsp验证是否包含中文逗号以及两个字符串包含逗号个数是否一致
- ADODB——RecordSet对象
- poj3278 Catch That Cow
- 十进制转m进制
- Android消息推送(技术分享)
- Java中区别.toString() ,(String),valueOf()方法
- php——学习笔记,验证密码是否一致,使用print_r以及colspan表情
- service()和doGet()和doPost()
- Android 弹无虚发之第三弹:ActionBar 更换背景、颜色、文字,自定义主题Style
- 人生第一条线段树!!!!FLY 1427: RMQ 两数之间最小值
- 视图控制器
- cocos2d-x 3.0 Android环境搭建(亲测通过)
- hdu 1024 Max Sum Plus Plus dp
- 我给不了你梦中情人,至少还有硬盘女神:hardseed
- Uva-1336-Fixing the Great Wall