To whom is this concern i have problem with log in page i am trying to redirect page on my index.php page but i couldn’t ,this code i copied from your website.Right here when i going from log in page to success page i getting blank page.
I think is problem here echo “<form action=”?op=login” method=”POST”>”; because when i am trying to preview in browser on the end of the domain i have this ?”?op=login”
<?php
session_start();
// dBase file
include “dbConfig.php”;
if ($_GET[“op”] == “login”)
{
if (!$_POST[“password”])
{
die(“You need to provide a username and password.”);
}
// Create query
$q = “SELECT * FROM `dbUsers
.”WHERE `username
.”AND `password_POST[“password”].”‘) ”
.”LIMIT 1″;
// Run query
$r = mysql_query($q);
if ( $obj = @mysql_fetch_object($r) )
{
// Login good, create session variables
$
$_SESSION[“valid_user”] = $
$_SESSION[“valid_time”] = time();
// Redirect to member page
Header(“Location: members.php”);
}
else
{
// Login not successful
die(“Sorry, could not log you in. Wrong login information.”);
}
}
else
{
//If all went right the Web form appears and users can log in
echo “<form action=”?op=login” method=”POST”>”;
echo “Username: <input name=”username” size=”15″>”;
echo “Password: <input type=”password” name=”password” size=”8″>”;
echo “<input type=”submit” value=”Login”>”;
echo “</form>”;
}
?>
?