HTML源码:

<html>
  <head>
    < >php表单提交及数据处理的实例</ >
  </head>
  <body>
    <form action=\"index.php\" method=\"get\">
        <p><input type=\"text\" name=\"user\" /></p>
        <p><textarea name=\"address\" rows=\"5\" cols=\"40\"></textarea></p>
        <p><input type=\"submit\" value=\"提交\" /></p>
    </form>
  </body>
</html>
  

 

PHP源码:

<?php
  print \"欢迎<b>\" . $_GET [\'user\'] . \"</b><br/>\\n\\n\";
  print \"你的地址是: <br/><b>\" . $_GET [\'address\'] . \"</b>\";
?>
收藏 打印