Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include '../inc/config.php';
- if($_POST)
- {
- $username = stripslashes($_POST['user1']);
- $password = stripslashes($_POST['pass1']);
- $result = mysql_query("SELECT * FROM admin where admin_name = '$username' and admin_pass = '$password'");
- if($result){
- $num_row = mysql_num_rows($result);
- if($num_row > 0){
- while($row = mysql_fetch_array($result)){
- if(
- $row['admin_name'] == $username and $row['admin_pass'] == $password
- )
- {session_start();
- $_SESSION['sesadmin'] = $row['admin_name'];
- $_SESSION['sspass'] = $row['admin_pass'];
- echo "<div class='alert alert-success' id='shadow'><i class='icon-ok-sign'></i> تم تسجيل الدخول , جاري التحويل</div><meta http-equiv='refresh' content='1;url=page.php'/>";
- }
- else
- {
- echo "عذرا , تأكد من ملعومات تسجيل الدخول";
- }
- }
- }
- }
- mysql_close();
- }
- else {
- echo '<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <title>تسجيل الدخول</title><form action="" method="post">
- <input type="text" name="user1" placeholder="أدخل اسم المستخدم">
- <br>
- <input type="text" name="pass1" placeholder="أدخل كلمه السر">
- <br>
- <input type="submit" name="sign" value="تسجيل دخول" />
- </form>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement