给我一个 EMail [email protected]
解决方案 »
- 162100forumPHP论坛无须安装数据库的!
- 验证码数据匹配部分怎么做啊?
- .class.php文件是什么文件?
- 关于if的错误, unexpected T_IF, expecting ')'
- utf-8编码,js设置的cookie,用php读取时中文乱码
- 简单程序没输出结果...帮看看..
- 如何知道一个字符在字符串中是否存在?
- 究竟怎么样才能远程连接ACCESS数据库啊???
- PHP可否调用动态链接库?
- 请问各位有没有用PHP上传100M以上的文件的经验?
- 像csdn这样,输入用户名,密码打开一个新页,如何把用户名,密码变量传到新打开的网页中
- 我的php连到数据库的时候,总会出现如下的问题
开玩笑的 :)
[email protected]
谢谢!
Thank
e-mail:[email protected]
if (!isset($ppp) or $ppp=="") {
$ppp=0;
}
if ($ppp==0){
echo "<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\">
<body>
<TABLE border=0 cellPadding=1 cellSpacing=1 height=320 width=140>
<tbody>
<tr><td height=8></td><tr>
<tr>
<td vAlign=top>
<FIELDSET class=fieldset><LEGEND>开始使用我的QQ</LEGEND>
<table border=0 cellPadding=0 cellSpacing=0 height=62 align=center>
<tbody>
<form action=$php_self>
<tr><td><br>
用户名字:<br><input type=text name=\"yname\" class=\"input\" size=13>
<br>
</td></tr>
<tr><td>
用户口令:<br>
<input type=password name=\"password\" class=\"input\" size=13>
<br>
</td></tr>
<tr><td>
<hr length=120>
<input type=hidden name=\"ppp\" value=\"1\">
<input type=image src=images/login.gif value=\"登录\">
<input type=image src=images/cancel.gif value=\"取消\" onclick=window.close()>
</td></tr>
</form>
</tbody>
<tr><td align=center><br>
<input type=button value=注册向导 class=button_summit onclick=\"window.open('cmp.php','','left=390,top=260,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=133,height=160');self.close()\"><br>
</td></tr>
</table>
</FIELDSET></td>
</tr></tbody>
</TABLE>
</body>
";
}if($ppp==1) {
$connect=mysql_connect('localhost','root','rootcanpass');
$select=mysql_select_db('qq2001',$connect);
$query1=mysql_query('select * from pass order by id desc',$connect);
$array1=mysql_fetch_array($query1);
$idend=$array1[id];
for ($id=1;$id<=$idend;$id++)
{
$mysql2="select * from pass where id=$id";
$query2=mysql_query($mysql2,$connect);
$array2=mysql_fetch_array($query2);
if($array2[name]==$yname&&$array2[passw]==$password) {$randid = md5(uniqid(rand()));
$ip=getenv("remote_addr");
$match_flag="select * from user0 where name='$array2[name]'";
$query_flag=mysql_query($match_flag,$connect);
$array_flag=mysql_fetch_array($query_flag);if ($array_flag[flag]!=1) {
$query3=mysql_query('select * from pass',$connect);
$sql3="update pass set uip='$ip' where name='$yname'";
$sql4="update pass set randid='$randid' where name='$yname'";
$result1=mysql_query($sql3);
$result2=mysql_query($sql4); $sql_flag="update user0 set flag=1 where name='$array2[name]'";
$result3=mysql_query($sql_flag);
$close=mysql_close();Header("Location:q2.php?name=$yname&randid=$randid");
exit;
} //if array_flag==1
else {
echo "<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\">
<body class=WebPager oncontextmenu=\"return false;\">
<table >
<tbody>you have already use qq2001
</tbody>
</table>
</body>
";
exit;
}}
}
echo "<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\">
<body class=WebPager oncontextmenu=\"return false;\">
<table border=0 cellPadding=1 cellSpacing=1 height=320 width=140>
<tbody>password or name erro</tbody>
</table>
</body>
";
}
?>