[thelist] PHP/SQL
Jay Fitzgerald
jayfitz at bayou.com
Thu Jan 25 11:59:35 CST 2001
nevermind....i found a solution....
<tip name = \"wake up\">
luckily i had originally set a cookie for the username on the original page:
--> setcookie("id","$username","","/","moss.bayou.com",0);
I then called the cookie on the page that i wanted to echo the variables
--> $id = $HTTP_COOKIE_VARS["id"];
.....and changed my select statement on that same page to:
--> $sql = "select firstname, lastname from users where username = '$id'";
now when i echo "my name is $firstname $lastname" i see "my name is Jay
Fitzgerald" on the page via the web.....
</tip>
I almost "went to sleep" on this one....
Thanks
Jay Fitzgerald wrote:
> ok...I may be overlooking something (since I am still a beginner)
>
> I have a user registration page that has a form field for "firstname"
> and "lastname" and once submitted these variables are placed into a
> mySQL database....
>
> Now, let's say that 5 or 6 pages deep into the site, how do I echo these
> variables being that the select satement for "where firstname =
> '$firtname'" holds no data since they weren't passed through a form on
> the preceding page?
>
> does that make since? like i said i am still a beginner, so it is
> possible that i am overlooking something....
>
> suggestions?
>
> Jay Fitzgerald - Web Development/Sales
> =============================================
> Bayou Internet
> http://www.bayou.com
> Mississippi Internet
> http://www.mississippi.net
> Vicksburg Online
> http://www.vicksburg.com
> Bama Online
> http://www.bamaonline.net
> =============================================
> ICQ: 38823829 Phone: 888-302-2968 Fax: 877-329-2296
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
--
Jay Fitzgerald - Web Development/Sales
=============================================
Bayou Internet
http://www.bayou.com
Mississippi Internet
http://www.mississippi.net
Vicksburg Online http://www.vicksburg.com
Bama Online
http://www.bamaonline.net
=============================================
ICQ: 38823829 Phone: 888-302-2968 Fax: 877-329-2296
More information about the thelist
mailing list