["Followup-To:" header set to comp.lang.php.]
danubian@hotmail.com wrote:
[snip][color=blue]
> My question is: how can I transfer the variable "$result" from my PHP
> to the .html pages, so that I'm able to print out the info for the
> existent user through page3.html. In other words, i would like to
> re-use "$result" from the php/mysql query; this, in order to display
> information about the successfully logged in user.
>
> Any help or suggestions i will appreciate a lot. Thanks.[/color]
Use session variables:
http://www.php.net/session
When you know the $result save it in a session variable
$_SESSION['SQLResult'] = $result;
and, afterwards, when you need the same result use the value saved in
the session variable
echo 'Saved result is: ', $_SESSION['SQLResult'];
Don't forget to start the session support in *every* page that uses the
$_SESSION array
--
USENET would be a better place if everybody read: | to mail me: simply |
http://www.catb.org/~esr/faqs/smart-questions.html | "reply" to this post, |
http://www.netmeister.org/news/learn2quote2.html | *NO* MIME, plain text |
http://www.expita.com/nomime.html | and *NO* attachments. |