日期:2014-05-17 浏览次数:20412 次
<?php
$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;
?>