博客首页|TW首页| 同事录|业界社区

<?php $id=mysql_connect(’localhost’,'root’,'root’);
mysql_select_db(’test1′,$id);
?>
<?php
if($_POST['denglu']==”提交”){
$name=$_POST[name];
$pass=$_POST[pass];
$query=”select * from aa where user=’$name’ and pass=’$pass’”;
$result=mysql_query($query);
if(mysql_num_rows($result)>0)
{echo “$_POST[name].已经通过”;}
else
{echo “$_POST[pass].没有通过”;}}
?>
<?php  echo “—————————-”;?>
<?php
if($_POST['tianjia']==”添加”){
$name=$_POST[name];
$pass=$_POST[pass];
$ip=$_POST[ip];
$querys=”select * from aa”;
$results=mysql_query($querys);
if($name==$user)
{echo “$_POST[name]已经存在”;}
else
{
$query1=”insert into aa (user,pass,ip) values(’$name’,'$pass’,'$ip’)”;
$result1=mysql_query($query1);
echo “添加成功”;
}
}
?>
<?php  echo “—————————-”;?>

<?php if($_POST['delete']==”删除”){
$name=$_POST[name];
$pass=$_POST[pass];
$ip=$_POST[ip];
$query2=”delete from aa where user=’$name’”;
$result2=mysql_query($query2);
echo “删除成功”;
}
?>
<?php  echo “—————————-”;?>

<?php $query=”select * from aa”;
$result=mysql_query($query);
while($myrow=mysql_fetch_array($result)){?>
<style type=”text/css”>
main{ width:890px; margin:0px; text-align:left; cursor: help}
.left{width:300px; margin-left:20px; font-size:12px; font-style:normal; text-align:left}
</style>
<div  id=”main”>
<div class=”left”>
<table  border=”0″><p>
<tr>
<td><?php echo $myrow[id];?>,
<?php echo $myrow[user];?>,
<?php echo $myrow[pass];?>,
<?php echo $myrow[ip];?></td>
</tr>
</table>
<?php }?>
</div>


上一篇: 我的电脑双击打不开 解决方法
下一篇:用div定义数据的位置

2条评论

  1. You are not right. I am assured. Let’s discuss. Write to me in PM, we will talk.

    P.S. Please review Business App Bar Icons for WP7 from martinking33

  2. 看见鬼一个iu股

发表评论