国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Summary of experience in PHP development

Before doing it, you must first clarify your goals, understand what functions you want to achieve, and then design the front-end page based on the functions.

Before making the layout of the page, you can draw a rough pattern on paper and then write it.

When all required pages are completed, write PHP code to implement the function.

The functions should be done one by one, and after completing one, do the next one. The principle of writing code is that on the premise of functional realization, the simpler the code, the better.

The reference to the path must be correct, otherwise the reference will not be successful.

Continuing Learning
||
<?php session_start(); header("content-type:text/html;charset=utf-8"); //連接數(shù)據(jù)庫 $link = mysqli_connect("localhost","root","root","regedit"); if (!$link) { die("連接失敗: " . mysqli_connect_error()); } if(isset($_POST)){ //用戶名不能為空 if(!$_POST['username']){ echo('用戶名不能為空'); return; } //密碼不能為空 if(!$_POST['password']){ echo('密碼不能為空'); return; } //判斷驗(yàn)證碼是否填寫并且是否正確 if(!$_POST['code']){ echo('驗(yàn)證碼不能為空'); return; }else if($_POST['code']!=$_SESSION['VCODE']){ echo('驗(yàn)證碼不正確'); return; } $sql="select username,password from form where username = '{$_POST['username']}' and password='{$_POST['password']}'"; $rs=mysqli_query($link,$sql); //執(zhí)行sql查詢 $row=mysqli_fetch_assoc($rs); if($row) { // 用戶存在; if ($username == $row['username'] && $pwd == $row['password']) { //對(duì)密碼進(jìn)行判斷。 echo "登陸成功,正在為你跳轉(zhuǎn)至后臺(tái)頁面"; //header("location:index.php"); } }else{ echo "賬號(hào)或密碼錯(cuò)誤" . "<br/>"; echo "<a href='login.html'>返回登陸頁面</a>"; } }
submitReset Code