Date: 10/15/01
- Next message: Jason G.: "Re: [PHP-DB] Re: Getting EXE or DLL version numbers?"
- Previous message: Jason Caldwell: "[PHP-DB] Re: Getting EXE or DLL version numbers?"
- In reply to: George Lioumis: "[PHP-DB] I'm stuck!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Check your "$password_in_db" query. Looks like you're checking the
password against the username field.
Won't fix your current problem, but it's worth fixing anyways.
-Szii
----- Original Message -----
From: "George Lioumis" <glioumis <email protected>>
To: <php-db <email protected>>
Sent: Monday, October 15, 2001 4:35 AM
Subject: [PHP-DB] I'm stuck!
<?php
include ('dbconnect.php');
if ($submit== "Login")
{
$username_in_db = mysql_query("select username from guestbook where
username='$username'") or die (mysql_error());
$password_in_db = mysql_query("select password from guestbook where
username='$password'") or die (mysql_error());
}
$get_guest_id_query = "select guest_id from guestbook where
username='$username' and password='password'";
$result = mysql_query($get_guest_id_query) or die (mysql_error());
echo $result;
echo "<BR><BR>";
if ($result)
{
($guest_id) = mysql_fetch_array($result);
$guest_id = $result;
echo $guest_id;
echo "<BR>Inside if<BR>";
$update_query = "UPDATE guestbook SET last_access='NOW()' WHERE
guest_id='$guest_id'"; <-----This thing refuses to play!
$result = mysql_query($update_query) or die(mysql_error());
}
?>
.....
Can anyone, please, tell me why the above code doesn't do the update in the
DB (mySQL)???
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jason G.: "Re: [PHP-DB] Re: Getting EXE or DLL version numbers?"
- Previous message: Jason Caldwell: "[PHP-DB] Re: Getting EXE or DLL version numbers?"
- In reply to: George Lioumis: "[PHP-DB] I'm stuck!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

