Blogger Information
Blog 23
fans 1
comment 0
visits 29681
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
练习get传值,流程控制,计数循环--PHP中文网第九期线上班
Liu
Original
902 people have browsed it


1. 练习get传值

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>get</title>
</head>
<body>
<form action="" method="get">
    <label for="name">用户名:</label>
    <input type="text" id="name" name="name" value="">
    <label for="password">密码:</label>
    <input type="password" id="password" name="password" value="">
    <br/>
    <button>登录</button>
</form>
</body>
</html>

<?php
echo '用户名:'.$_GET['name'];
echo '<br/>';
echo  '密码:'.$_GET['password'];
?>

运行实例 »

点击 "运行实例" 按钮查看在线实例

效果图

1.png

2. 练习流程控制 (手写)


3. 练习计数循环 (手写)

实例

<?php
for ($int=1;$int<10;$int++){
    echo $int;
    echo '<br/>';
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

手写代码


1.jpg

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