<?
$conn = mysql_connect("localhost","11111","22222")
$action = $_POST['action']
if($action == 'send'){
$username = $_POST['username']
$password = $_POST['password']
mysql_select_db("333333",$conn)
$sql = "INSERT INTO player (username,password) VALUES ('$username','$password')"
$result = mysql_query($sql,$conn)
}
?>
<html>
<body>
<form method="post" action="post.php">
<input type="text" name="username">
<input type="text" name="password">
<input type="hidden" name="action" value="send">
<input type="submit" name="Submit" value="提交">
</form>
</body>
</html>
5月25日 01:12 是????表单页:
<form action="actioning.asp" method="post">
确认页(actioning.asp):
<%
name=request.from("name")
pass=request.from("pass")
''''''''链接数据库(其表名:date)
''''''''下面将数据加入数据库
exec="insert into date (NAME,PASS) values('"+name+"','"+tpass+"')"
conn.execute (exec)
''''''''关闭数据库
%>
<font size=3 color=red>尊敬的<%=name%>:祝贺您注册成功</font>
试????
<form method='Get' name='SearchForm' action='Action'><input type='text' name='keyword' size='20' value='' maxlength='50'>
这儿是以按钮提交方式,*处该如何编写呢?请高手赐教。
<input type='submit' onclick='Field.value="1"' value='以a搜索'>
<input type='submit' onclick='Field.value="2"' value='以b搜索'>
<input type='submit' onclick='Field.value="3"' value='以c搜索'>
<input type='submit' onclick='Field.value="4"' value='以d搜索'>
<input type='hidden' name='Field' value='0'>
</form>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)