View Single Post
Old 2010-03-04, 01:18 PM   #13
DIVAD3
I'm going to the backseat of my car with the woman I love, and I won't be back for TEN MINUTES
 
DIVAD3's Avatar
 
Join Date: Aug 2009
Location: Up-Sate NY !
Posts: 79
Send a message via ICQ to DIVAD3
AGGREVATING...

AGGREVATING: Login No such luck. What the Fuk do I have wrong???
I should be able to log in using the username of:admblogdetailzus
And the password of:OLIVIAlynn616

And Mark! I am not sure why I see the: (Error connecting to database) on the login page. That too is a mystry to me.

Anyone is welcome to try this login: http://www.detailzusedcars.com/us-auto-deal4/login.php Good lord. This means money in my pocket when I get this figured out for the purpose of this site I have built.

http://www.detailzusedcars.com/us-au...l/register.php

Just as it is put in the script:
Quote:
<?php
session_start();
// dBase file
include "dbConfig.php";

if ($_GET["op"] == "login")
{
if (!$_POST["admblogdetailzus"] || !$_POST["OLIVIAlynn616"])
{
die("You need to provide a username and password.");
}

// Create query
$q = "SELECT * FROM `dbUsers` "
."WHERE `username`='".$_POST["admblogdetailzus"]."' "
."AND `password`=PASSWORD('".$_POST["OLIVIAlynn616"]."') "
."LIMIT 1";
// Run query
$r = mysql_query($q);

if ( $obj = @mysql_fetch_object($r) )
{
// Login good, create session variables
$_SESSION["valid_id"] = $obj->id;
$_SESSION["valid_user"] = $_POST["username"];
$_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\"><br />";
echo "Password: <input type=\"password\" name=\"password\" size=\"8\"><br />";
echo "<input type=\"submit\" value=\"Login\">";
echo "</form>";
}
?>

Last edited by DIVAD3; 2010-03-04 at 01:32 PM..
DIVAD3 is offline   Reply With Quote