catching the query string value in the same page

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
krraleigh
Forum Commoner
Posts: 86
Joined: Tue Jul 17, 2007 2:52 pm

catching the query string value in the same page

Post by krraleigh »

I need to determine what values to query from a database.
I can do this by setting a query string on the link with my member status.

What I don't know how to do is capture that value and then store it in the same page so that I can retrive it.

myLink.php?memberid=1

How do I capture that value so that I can use in a database query?
Can you point me to a link?

Not sure how to search for this one.

Kevin :D
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Re: catching the query string value in the same page

Post by infolock »

that would be by calling the superglobal $_GET.

Example:

Code: Select all

 
echo $_GET['memberid'];
 
krraleigh
Forum Commoner
Posts: 86
Joined: Tue Jul 17, 2007 2:52 pm

Re: catching the query string value in the same page

Post by krraleigh »

I appreciate your quick response.

Thank yOu
Kevin
Post Reply