Log in

View Full Version : login panel



alexdog1805
10-08-2010, 07:40 PM
I want to in right column to appears the login panel with username, password and login, register and lost password......

here is the link: otisweb.ro/steelgym/

I used zencart to build it......

[Nicolas]
10-13-2010, 02:34 AM
Where is the link to the login? We also need the the PHP code to it. Do you have access to MySQL databases?

[Nicolas]
10-13-2010, 03:01 AM
Here's the code (thank you very much to BlueWalrus):
In the page after the login, put this code there before anything else:

<?php
if ($_SERVER['HTTP_REFERER'] == "http://kapleenmusic.webfreehosting.net/thisisatestyouknow.php" || $_SERVER['HTTP_REFERER'] =="yoursite.com/login.php")
\\Change that link to the page of the login. {
if ($_GET['secured'] == 24) {
?>
And put this after everything else on that page:

<?php
} else {
echo "Unverified"; }
} else {
echo "Sorry, but your login failed.";
}
?>

Put this code before anything else on the Login page:

<?php
if ( isset($_POST['username']) && isset($_POST['password'])) {
if ($_POST['username']=="foo" && $_POST['password']=="password") {
header("Location: thepagetologinto.php?secured=24");
} else {
$fail = "Login Failed";
}
}
?>
in header("Location: thepagetologinto.php?secured=24"); change thepageyouloginto.php to, well, the page you login to. And to edit the user names and passwords, edit [icode]($_POST['username']=="userhere" && $_POST['password']=="passwordhere") {
You can add multiple like this:

if ($_POST['username']=="foo" && $_POST['password']=="password") {
if ($_POST['username']=="foo" && $_POST['password']=="password") {
Have fun and once again thanks BlueWalrus!