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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do youI open a new page without user response?

Status
Not open for further replies.

tbrowne

IS-IT--Management
Dec 27, 2001
51
US
I'd like to have users fill in the contents of a form and click the submit button. PHP code on that page will validate the entries and call a confirmation page if the entries are correct. If not correct, the user will be asked to correct the errors.

I'm not sure how to call the next page without the user clicking a next button. I know this must be easy, but I haven't been able to figure it out.

Thanks!
 
[tt]header('Location: nextpage.php');[/tt]
would redirect the user to [tt]nextpage.php[/tt].

//Daniel
 
The best way to do this is to make a JavaScript script that will check the content of the form and then if all content is all right it will redirect you to the another php page. There are many ways how to redirect your page. Danielhozac mantioned one of them which is most commonly used in php scripts but remember, that header() function must be located before any HTML output to the browser.
 
yup but what danielhozac said can only suit for this as the redirection is after validation....

Known is handfull, Unknown is worldfull
 
yeah but the problem is that it will take server time and bandwith...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top