Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to do a 'forward' ?? 1

Status
Not open for further replies.

frag

Programmer
Dec 7, 2000
321
GB
hi!

I have a HTML-form that contains three different submit-buttons (same name, different values). If one of the buttons is pressed, the page will call the php-page defined with 'action=' in the form-tag.

On the second page I check which of the three buttons have been pressed. Depending on the result I want to call one of three possible pages... so I need a possibility to 'auto-forward' to a certain page from anywhere in the php-code (I know there is a solution to auto-forward within the header-tag, but this is not what I am looking for).

Do you have any suggestions??

regrads

frag patrick.metz@epost.de
 
nice... this works. thank you daniel!

cu

frag patrick.metz@epost.de
 
it's me again... sorry, I am new to php!

can I do something like this:

header("Location: somepage.php?var1=" + $HTTP_POST_VARS["input"]; )

or that:

$myValue = $HTTP_POST_VARS["input"];
header("Location: somepage.php?var1=" + $myValue);

???

frag patrick.metz@epost.de
 
ok, it's:

header("Location: somepage.php?var1=$myValue");

but thanx anyway... :)

frag patrick.metz@epost.de
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top