php post example

来源:互联网 发布:淘宝鲜花速递 编辑:程序博客网 时间:2024/06/06 02:13

1.主页index.php,输入变量

<html><head>    <title>Form Posting Test</title></head><body>    <div>        <p>Please complete this form to submit your posting:</p>        <form action="handle_post.php" method="post">            <p>First Name: <input type="text" name="first_name" size="20" /></p>            <input type="submit" name="submit" value="Send">                </form>            </div></body></html>

2.接受页handle_post.php,接受index.php页的输入变量

<?php$first_name=$_POST['first_name'];print "$first_name"?>





0 0