Display HTTP Post &this=0&that=1 in referer echo?

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
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Display HTTP Post &this=0&that=1 in referer echo?

Post by JAB Creations »

I know how to echo the referer page...

Code: Select all

$referer = basename($_SERVER['HTTP_REFERER']); echo $referer;
What I'd like to do is echo the referer page and it's HTTP GET commands (whatever they are called). I'm interesting in testing out a form right now to see if I'm passing the correct values.

So when I use a form to see it's passing variables (example.php) I'll see it's variables in the URL (example.php&this=0&that=1).
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

What are you trying to achieve?
JAB Creations wrote:Display HTTP Post
JAB Creations wrote:What I'd like to do is echo the referer page and it's HTTP GET commands
So which one is it? post or get?
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Post by JAB Creations »

Never mind, I figured it out...

Code: Select all

$referer = basename($_SERVER['HTTP_REFERER']);
echo $referer . '<br />';
I also set the form's method to "get" and it works fine (showing all the variables in the URL now).
Post Reply