时间:2021-07-01 10:21:17 帮助过:20人阅读
$mysql_server_name='localhost';
$mysql_username='root';
$mysql_password='123456';
$mysql_database='you';
$conn = mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
mysql_select_db($mysql_database,$conn);
mysql_query("set names 'utf8'");
$sql = "SELECT * FROM `member` WHERE username LIKE 'xiha'";
$result = mysql_query($sql,$conn);
$row = mysql_fetch_array($result);
mysql_close($conn);
if($row['groupid'] = '1'){
$capacity = '100';
} else if($row['groupid'] = '10'){
$capacity = '1000';
} else {
exit();
}
echo $capacity;
?>