Skip to main content
Known Participant
December 30, 2010
Question

redirecting to a new page

  • December 30, 2010
  • 1 reply
  • 362 views

i currently use header("Location: www.site.com"); to redirect to a webpage when a PHP script has run

1) is there a none-headder way to change to a new URL?, if not how can i have HTML content displayed while the code runs - would putting the headder command in a function which is only called when the script has finished work?

2) how do you send variables to the new URL?

This topic has been closed for replies.

1 reply

December 30, 2010

1.) You can use location or you can add if statement to page where if form is submitted then process form and display "your form has processed" else display form, etc. Basically it's a nest of if statements.

2.) variables are sent in php through cookie, session, url parameter or post value. URL parameter would work if sent to a different URL.

Your descriptions and questions, although somewhat to-the-point, are still rather vague. If you explain a bit more detail of your desire and perhaps include the code you're working with you will surely receive a response of reciprocated effort compared to what you have provided.