Forum Moderators: coopster

Message Too Old, No Replies

Whats the best way to?

Url forwarding.

         

DR_Way

1:07 pm on Jul 6, 2006 (gmt 0)

10+ Year Member



Hi there,

i want to know the best way of programming a function like this?

basicly i need to send the url of my first page to a form in my 2nd page, which well then use the url to code an email which gets forwarded to the user or other people. ive got the email side of it done but dont know how to import the url as the user changes pages from the start page to the form page.

help!

Scally_Ally

1:47 pm on Jul 6, 2006 (gmt 0)

10+ Year Member



You could maybe get the URL on the original page (page1) like so,
$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
and then put this into a hidden variable and then pass it to your other pages. That way the first page will always be remembered.

Ally

eelixduppy

2:58 pm on Jul 6, 2006 (gmt 0)



Welcome to WebmasterWorld DR_Way,

You can also use $_SERVER["HTTP_REFERER"] [us3.php.net]. Good Luck!

DR_Way

3:44 pm on Jul 6, 2006 (gmt 0)

10+ Year Member



im still pretty stuck, ive decided i may use sessions but im struggling to get the information to cross the pages, i can start a session and label the variable then what do i need to do?

help still!

eelixduppy

5:59 pm on Jul 6, 2006 (gmt 0)



Have you taken a look at PHP's session handling functions [us2.php.net]?