Page 1 of 1

Get Full Path of Page

Posted: Thu May 31, 2007 9:12 am
by violet
How do I get the full path of Page B, which has URL parameters generated by Page A (a PHP form with method = GET)?

$_GET only seems to work if one is getting variables from within the same page and include seems to include the entire page (which is not what I want)..

Posted: Thu May 31, 2007 9:16 am
by superdezign

Code: Select all

<pre><?php print_r($_SERVER);?></pre>
Run that. It'll show you.

Edit: Misread the question.

You have to pass get variables along from page to page if you want to keep them.

Posted: Thu May 31, 2007 11:36 am
by violet
Ah, thanks, I will figure out how to do this :)

Love Image your site, by the way!

Posted: Thu May 31, 2007 11:50 am
by superdezign
:D Thanks.

This is a good way to get all $_GET variables:

Code: Select all

$getVars = '?';
foreach($_GET as $id => $data)
{
    $getVars .= $id . '=' . $data . '&';
}
$getVars = substr($getVars, 0, (strlen($getVars) - 1));
Then, just concatenate them to the end of your URLs.

Posted: Thu May 31, 2007 11:58 am
by violet
Everyone's been so helpful here. Thanks again!

By the way I see a:

/>

on the upper left side of your page.

I'm wondering if it's just my browser because Opera's weird sometimes..

My fave layout is 'YourCompany' ^_^ Spiffy!

Posted: Thu May 31, 2007 12:01 pm
by superdezign
violet wrote:Everyone's been so helpful here. Thanks again!

By the way I see a:

/>

on the upper left side of your page.

I'm wondering if it's just my browser because Opera's weird sometimes..

My fave layout is 'YourCompany' ^_^ Spiffy!
Yeah, due to monetary issues, I haven't touched the company site in a while. I've other projects that make my survival possible.