Blogger Information
Blog 27
fans 0
comment 0
visits 20754
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
post传值-2019年11月19日
古城老巷丶
Original
778 people have browsed it

练习post传值

代码

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>post传值</title>
</head>

<body>
    <form action="" method="post">
        账号:<input type="text" name="text" id="">
        密码:<input type="password" name="password" id="">
        <button>提交</button>
    </form>
</body>

</html>
<?php
echo '账号:' . $_POST['text'] . '<br>';
echo '密码:' . $_POST['password'];
?>

效果:

image.png


手抄:

image.png


总结:

post传值,一般用在重要数据传输上面,传递的数据不轻易被发现。在HTML的form表单以post形式专递,在PHP页面也要使用post方式获取。








Correcting teacher:查无此人查无此人

Correction status:qualified

Teacher's comments:完成的不错,继续保持
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post