溫瑞烘老師的教學歷程檔案(Teaching ePortfolio) - PHP教學 - PHP程式架構
 

資訊管理系
副教授
温瑞烘


歷程檔案 Portfolio


關於我 About Me

PHP程式架構

<?php
  // 結合兩個程式為一個,並完全以PHP撰寫
  $command=$_POST['command']; // 取出變數值
  if ($command==null) {       // 空值, 未經由form傳送     
    echo "<html>";
    echo "<body>";
    echo "<center>";
    echo "<form method=post action=$SELF_PHP>";
    echo "請輸入一個整數:";
    echo "<input type=text name=n size=10>";
    echo "<p>";
    echo "<input type=submit name=command value=送出>";
    echo "<input type=reset  name=command value=清除>";
    echo "</form>";
    echo "</center>";
    echo "</body>";
    echo "</html>";
  }
  else if ($command=='送出') {
    $n=$_POST["n"];
    echo "<html>";
    echo "<body>";
    echo "<center>";
    echo "您輸入的字串為"  . $n . "<br>"; 
    echo "</center>";
    echo "</body>";
    echo "</html>";
  }
?>
全部共 0則留言
登入帳號密碼代表遵守學術網路規範
 


文章分類 Labels

 


最新文章 Top10

中華科技大學數位化學習歷程 - 意見反應