php post example

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weiwei_c/article/details/51010489

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"
?>





猜你喜欢

转载自blog.csdn.net/weiwei_c/article/details/51010489
今日推荐