Home >Backend Development >PHP Tutorial >我的第三行PHP代码之接受安卓端get请求,注册新用户写入数据库

我的第三行PHP代码之接受安卓端get请求,注册新用户写入数据库

WBOY
WBOYOriginal
2016-06-23 13:44:00950browse

<?php $con=mysql_connect("localhost","root","") or die("failed to connect db"); mysql_select_db("lio")or die ("failed to select db"); $user=$_GET['user']; $passwd=$_GET['passwd']; $i="INSERT INTO `userinfo` ( `user` , `passwd` ) VALUES ('$user','$passwd')";echo $i; mysql_query($i);?> 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn