Easy Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
SilverMist
Forum Commoner
Posts: 65
Joined: Tue Mar 02, 2004 2:06 pm
Location: Canada
Contact:

Easy Question

Post by SilverMist »

How do I get the user's ID to appear? Like I know all about the

Code: Select all

<? echo $userid; ?>
stuff, but I need to call it before I can put that part in to show it. Help?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

uhhhh... we probably need more info.. the info could be in any one of these:

Code: Select all

echo '<pre>$_GET<br />'.var_dump($_GET, true).'$_POST<br />'.var_dump($_POST,true).'$_SESSION<br />'.var_dump($_SESSION,true)'</pre>'
it could also be in a cookie or something..
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

not sure what you mean or trying to do..

but..

Code: Select all

$userid = '0 or some id' ;

# now this would echo back the $userid
# or get the userid from a database and do the same
# it will give the same result... 

echo $userid;
if that is not what u wanted to know.. than either i read it wrong or you explained it poorly
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

[off topic]is it just me, or do threads that start with off with "easy question" rarely are? :P
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

They would eb easy, if the person knew what they were talking about half the time and could explain what they wanted.
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

Illusionist wrote:They would eb easy, if the person knew what they were talking about half the time and could explain what they wanted.
that could be framed and worshipped by the people who help others here...

hey, uhh, i need a script that calls a for a b value and the b values comes from the place down the street where u can buy milk for $1.50, you know what i'm talking about! HELP!
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

haha, agreed tim!

Oh yeah! I can help!! hehe
Post Reply