PHP?? ??? ??? ?? ?? ???
??? ???? ???? ????? ?? ????? HTML? PHP ??? ???? ???? ???. ?? ??? ?????.
??? HTML ????? ???? ????? ?????, ?? ???? ??????? ????? ??????? ???????? ??? ???? ??? ???. ??? ??? ????
<?php
session_start();
header("content-type:text/html;charset= utf-8");
$conn=mysqli_connect("localhost","root","root","Ressage");
mysqli_set_charset($conn,'utf8'); //?? ?? ??
$sql= "select * from ressage_user;
$result=mysqli_query($conn,$sql);
?>
session_start();
header("content-type:text/html;charset= utf-8");
$conn=mysqli_connect("localhost","root","root","Ressage");
mysqli_set_charset($conn,'utf8'); //?? ?? ??
$sql= "select * from ressage_user;
$result=mysqli_query($conn,$sql);
?>
?? ? ?? ??? ???? ???????? ???? ??? ? ????.
??? ?? HTML ???? ???? ?? ??? ?????. ?? ??? ???
<p> <? if($result==null){ echo"暫時(shí)沒有留言"; } ?> </p> <?php while($row=mysqli_fetch_array($result)){ ?> <table border="1" cellspacing="0"> <tr> <td>姓名:<?php echo $row['name']?></td> <td style="text-align: center">留言時(shí)間:<?php echo $row['ressage_time']?></td> <td><a href="ressage_delete.php?id=<?php echo $row['id']?>" >刪除</a> </td> </tr> <tr> <td colspan="3">你的留言:<?php echo $row['content']?></td> </tr> </table> <?php }?>
? ??? HTML? PHP? ??? ????. ?? ??????? ???? ?? ???? ????. ?? ?? ?? ??? ???? ?????. ?? ??? ???? ???? ?? ??? ? ??? ??? ??? ???? ??? ?? ??? ??? ??? ??? ?? ??? ?????. ?? ?? ?????