Hello,

I'm a totally newbie to php/Mysql but I'd like to know if it is normal that I have to connect 3 times to the db in one page.


For example, I have

1. A connection for the login / pass a $_SESSION['login'] before the HTML tags

2. I need to say hello to the user so I reconnect, run a query to select the user having the login and echo 'Hello '.$user['login'].'!''

3. I need to show him his friends a bit later, so I have to connect a last time and re-run a querry because I can't use the data $user that I used in my upper php code...


Is there a walkthroug to have only one connection for the page?

Thanks

Matthieu

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to