<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="tex/html; charset=utf-8">
<title> test </title>
</head> <body>
<?php
$send = isset($_POST['send'])? $_POST['send'] : 0; if($send==1){ $mac = isset($_POST['mac'])? $_POST['mac'] : ''; if($mac==''){
exit('mac is empty');
} $conn=@mysql_connect("host","db_account","db_password") or die(mysql_error()); // host, db_account, db_password 请根据实际情况填写
@mysql_select_db('yz',$conn) or die(mysql_error()); $sqlstr = "select name from mac where mac='".mysql_escape_string($mac)."' limit 1";
$query = mysql_query($sqlstr) or die(mysql_error()); $result = mysql_fetch_assoc($query); if($result){
echo $mac.':'.$result['name'];
}else{
echo $mac .':未注册';
} @mysql_close() or die(mysql_error());
}else{
?>
<form name="form1" method="post" action="index.php">
<p>mac:<input type="text" name="mac" value=""></p>
<p><input type="submit" name="b1" value="提交"></p>
<input type="hidden" name="send" value="1">
</form>
<?php
}
?>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货