php客户端和服务器的值传递

客户端(浏览器):

		<form name="form1" action="insertnode.php" method="post">

			<div align="center" id="d1">
				当前节点的id:<input type="text" name="parent_id_text" id="cn"><br> <br> <input
					type="button" value="修改" id="b1" onclick="showinput1()"> <input
					type="button" value="添加测试" onclick="onAdd()"> <input type="button"
					value="删除" id="b2" onclick="dele()"> <input type="button"
					value="添加子节点" id="b3" onclick="showinput2()">
				<hr>
			</div>
			<div id="d2" align="center">
				修改的节点的名称是:<input type="text" name="upname" id="updatename"><br>
				<br> <input type="button" value="确定修改" onclick="">
			</div>
			<div id="d3" align="center">
				添加的节点的名称是:<input type="text" name="addname" id="addname"><br>
				<br> <input type="submit" value="确定添加" onclick="return check()">
			</div>
		</form>

  服务器:

<?php
require_once ('db_fns.php');
session_start ();
$parent_id = $_POST ['parent_id_text'];
$node_name = $_POST ['addname'];
// echo $new_title;
db_insert_node($parent_id, $node_name);
?>

 

posted @ 2013-08-12 18:21  souroot  阅读(351)  评论(0编辑  收藏  举报