الصفحة الاولى
<html> <head> <meta charset="utf-8" /> <title>صفحة دخول</title> </head> <body> <center><br> ادخل اسم المستخدم <form action="login.php" method="post"> <input type="text" name="user"><br> ادخل كلمة المرور <br> <input type="password" name="pass"><br><br> <input type="submit"> </form> </center> </body> </html>
ملف login.php
<html> <head> <meta charset="utf-8" /> <title>صفحة دخول</title> </head> <body> <center><br> ادخل اسم المستخدم <form action="login.php" method="post"> <input type="text" name="user"><br> ادخل كلمة المرور <br> <input type="password" name="pass"><br><br> <input type="submit"> </form> </center> </body> </html>
ملف login.php
كود:
<html> <head> <meta charset="utf-8" /> <title>صفحة الدخول</title> </head> <body> <? $user = $_POST['user']; $pass = $_POST['pass']; if($user == "linux" && $pass == "123"){ echo "كلمة المرور صحيحه"; }else{ echo "كلمة المرور خاطئة انتظر لاحظات لكي ننقلك لصفحة الدخول من جديد"; echo "<META HTTP-EQUIV='Refresh' CONTENT='3; url=login.htm'>"; } ?> </body> </html>
ليست هناك تعليقات:
إرسال تعليق