On Thursday 26 August 2004 02:17, Nathan Mealey wrote:
> I cannot seem to access elements inside of the array $things in the
> code below. All of the errors say "Undefined offset: 7 in
> /Library/WebServer/Documents/lis/check.php on line 26" I don't see
> why...
>
> The code is:
>
> $q = "select * from users where email='".$email."' and
> password='".$pass."'";
> $results = mysql_query($q);
> if ($results) {
> while ($list=mysql_fetch_assoc($results)) {
> $things[]=$list;
> }
> }
> //$things[7] is a MySQL timestamp column named "last_login"
> $date = strtotime($things[7]);
print_r($things); var_dump($things)
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Dealing with failure is easy:
Work hard to improve.
Success is also easy to handle:
You've solved the wrong problem.
Work hard to improve.
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php