-1

"The page isn't redirecting properly"

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR...l1-strict.dtd">
<!--


-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Yakity Yak</title>
<link href='http://fonts.googlea...=Oswald:400,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googlea...css?family=Abel|Satisfy' rel='stylesheet' type='text/css'>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">

  <p><!-- end #header --></p>
  <div id="header" class="container">
    <div id="logo">
      <h1><a href="#">Yakity Yak</a></h1>
    </div>
    <div id="menu">
      <ul>
        <li class="current_page_item"><a href="homepage.php">Homepage</a></li>
        <li><a href="trip.php">Destinations</a></li>
        <li><a href="contact.php">contact </a></li>
        <li><a href="registration.php">Login</a></li>
        <li><a href="adminlogin.php">Leader</a></li>
        <li></li>
        <li></li>
      </ul>
    </div>
  </div>
  <blockquote>
    <blockquote>
      <p> <center><img src="sd.jpg" width="999" height="300"  alt=""/></center>  </p>
    </blockquote>
  </blockquote>
  <div id="page">
    <div class="post">
      <h2 class="title"><a href="#">Welcome Admin</a></h2>
<form action="adminlogin.php" method="post">
<table align="center" style="cellpadding: 10px; cellspacing: 10px;">

<tr><td>username:</td>
<td><input type="text" name="username"/></td></tr>

<tr><td>password:</td>
<td><input type="password" name="password"/></td></tr>
<tr><td>
</td><td><input type="submit" name="submit"/></td></tr>
</table>
</form>
</body>
</html>

<div class="entry">

</div>
    </div>
  </div>
<?php
session_start() ;
if (!session_is_registered('pass')){
header('location:adminlogin.php');


}



$username=$_POST['username'];
$password=$_POST['password'];

if ($username==('admin') && $password==('123') ) {


    $session_register['username'];
    $session_register['password'];


}
else echo 'something went wrong! Try again. Thanks.' ;

?>


</body>
</html>

Edited by pyTony: Moved to correct forum

Votes + Comments
Keep it organized, not Python!
1
Contributor
1
Reply
30
Views
3 Years
Discussion Span
Last Post by dean.ong.14
0

now i got

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR...l1-strict.dtd">
<!--


-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Yakity Yak</title>
<link href='http://fonts.googlea...=Oswald:400,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googlea...css?family=Abel|Satisfy' rel='stylesheet' type='text/css'>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">

  <p><!-- end #header --></p>
  <div id="header" class="container">
    <div id="logo">
      <h1><a href="#">Yakity Yak</a></h1>
    </div>
    <div id="menu">
      <ul>
        <li class="current_page_item"><a href="homepage.php">Homepage</a></li>
        <li><a href="trip.php">Destinations</a></li>
        <li><a href="contact.php">contact </a></li>
        <li><a href="registration.php">Login</a></li>
        <li><a href="adminlogin.php">Leader</a></li>
        <li></li>
        <li></li>
      </ul>
    </div>
  </div>
  <blockquote>
    <blockquote>
      <p> <center><img src="sd.jpg" width="999" height="300"  alt=""/></center>  </p>
    </blockquote>
  </blockquote>
  <div id="page">
    <div class="post">
      <h2 class="title"><a href="#">Welcome Admin</a></h2>
<form action="" method="post">
<table align="center" style="cellpadding: 10px; cellspacing: 10px;">

<tr><td>username:</td>
<td><input type="text" name="username"/></td></tr>

<tr><td>password:</td>
<td><input type="password" name="password"/></td></tr>
<tr><td>
</td><td><input type="submit" name="submit"/></td></tr>
</table>
</form>
</body>
</html>

<div class="entry">

</div>
    </div>
  </div>
<?php
session_start() ;
if (!session_is_registered('pass')){

;



}



$username=$_POST['username'];
$password=$_POST['password'];
?>
<?php
if ($username==('admin') && $password==('123') ) {


    $session_register['username'];
    $session_register['password'];
    header('location:login33.php');

}
else echo 'something went wrong! Try again. Thanks.' ;

?>


</body>
</html>

Deprecated: Function session_is_registered() is deprecated in F:\xampp\htdocs\login33.php on line 67
something went wrong! Try again. Thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.