:::

1-2 index.php

<!DOCTYPE html>
<html lang="zh-TW">
<head>
  <meta charset="UTF-8">
  <title>EZ佈告欄</title>
</head>
<body>
  <h1>最新消息</h1>


  <?php
    //echo 輸出,字串用雙引號包起來,變數放在字串中時,要加上{}
    echo "<h2>{$_POST['news_title']}</h2>";

    // nl2br()將換行符號轉換為<br>標籤
    $news_content=nl2br($_POST['news_content']);
    echo "<p>$news_content</p>";
  ?>


  <!-- 連結 -->
  <a href="post.php">發布新聞</a>

</body>
</html>

 


:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.cp22.secserverpros.com%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1022%26tbsn%3D34

書籍目錄

展開 | 闔起

線上使用者

358人線上 (154人在瀏覽線上書籍)

會員: 0

訪客: 358

更多…