[修改] ">[删除] 结果页面输出是乱码, 页面的编码 也变成了 gb312 原来输入的 是UTF 8手动将页面编">
时间:2021-07-01 10:21:17 帮助过:25人阅读
$mysql_server_name = "localhost"; $mysql_username = "root"; $mysql_password = "123456"; $mysql_database = "gbook"; $sql = "SELECT * FROM gbook ORDER BY 'id' DESC"; //排序 后留言的在前面显示 $conn = mysql_connect($mysql_server_name,$mysql_username,$mysql_password); mysql_select_db($mysql_database,$conn); $result = mysql_query($sql); while($row = mysql_fetch_row($result)) { // ----if语句判断男女------ if($row[2]==1) { $gender = '男';} else { $gender = '女'; } ?>
=$row[6]?> =$row[5]?> =$row[1]?>(=$gender?>) =$row[3]?> |
=nl2br($row[4])?> ">[修改] ">[删除] |