deserts
5y6s Inc.
级别: 总版主
精华:
6
发帖: 12506
威望: 58 点
金钱: 6793 RMB
贡献值: 75 点
朋友圈:
男人俱乐部
在线时间:2624(小时)
注册时间:2004-09-12
最后登录:2008-10-12
|
做好了前台,你现在应该到相应的目录里写你的reg.php了,他是负责和mysql进行交互的服务器端的脚本。 reg.php <?php $db=mysql_connect('localhost','root');//连接数据库 mysql_select_db('flash',$db); //选择数据库 $n=$_POST["Name"]; //接受你插入进来的变量 $e=$_POST["Email"]; //接受你插入进来的变量 $l=$_POST["Location"]; //接受你插入进来的变量 $query="INSERT INTO users (Name,Email,Location) VALUES ('$n','$e','$l')";//写插入语句 $result = mysql_query ($query); //执行查询 ?>
OK!这时候你就可以点一下前端flash的按钮了,做好了之后,到数据库里看一看select * from users;应该没问题吧,你应该可以看到你写入的数据了。
|
|
|
|
[2 楼]
|
Posted: 2006-11-06 11:00 |
| |