一個很簡單的php留言板。籌建在sae上的。

來源:互聯網
上載者:User
一個很簡單的php留言板。。。。搭建在sae上的。。。

我在sae上搭建了一個個人簡曆的頁面: 有興趣的可以訪問 http://671coder.sinaapp.com/

在做下面一個簡單的留言板的時候,卡了我很久,雖然完全沒用過php。。但是還是最後勉強寫出來了。。。

首頁面html是這樣寫的:

                  

Contact Me

This block can be hidden and only shown in a popup.


驗證碼功能暫時還沒有實現。。。

背景php是這樣寫的:

";$mysql = new SaeMysql();$judge = true;for ($i=0; $i<10; $i++) {if (strpos($name, substr($m_notchar, $i, 1)) || strpos($message, substr($m_notchar, $i, 1)))$judge = false;}if( $mysql->errno() != 0 ) {die( "Error:" . $mysql->errmsg() );} else if (!$judge) {?>runSql( $sql );?>closeDb();?>

然後最後顯示留言板是這麼寫的:

My messages     
 
    671coder's message:


    ";while ($r = mysql_fetch_array($result)) {$idx = $r["MId"];$user = $r["MName"];$text = $r["MText"];?>
  • :

closeDb();?>

怎麼樣!感覺上很炫吧!



資料庫的話想必大家都知道是怎麼設計的了吧?!


  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.