Page Redirection Problem (and hello)
Posted: Fri Jan 23, 2004 11:34 am
Afternoon all, I'm new here, so hello
I have a wee problem with a php project I'm doing, and wondered if you could help (i'm relatively new to php, four months or so, but I've been coding Java for years).
Anyhow....
I have an online application form. It consists of a series of HTML pages, which pass variable to a Controller page. The Controller page is a PHP page, and takes the passed variables, does stuff to them (adds them to the db, manipulates them etc etc), and generates a page telling the user what has happened (ie the following variables have added.....).
What I need now is for this Controller page to automatically "forward" the user to the next HTML page in the questionaire.
I've tried to use the header("Location: http://www.google.com"); snippet, but this doesn't work, and I suspect this is because the Controller uses echo statements before it terminates.
To re-iterate the Controller is a big SWITCH statements, and each internal bit looks something like
case X:
output passed variables to the screen;
manipulate the variables;
stick them in the database;
and then forward to the next HTML page;
(and obviously break;)
If anyone can help, I'd be very greatful
I have a wee problem with a php project I'm doing, and wondered if you could help (i'm relatively new to php, four months or so, but I've been coding Java for years).
Anyhow....
I have an online application form. It consists of a series of HTML pages, which pass variable to a Controller page. The Controller page is a PHP page, and takes the passed variables, does stuff to them (adds them to the db, manipulates them etc etc), and generates a page telling the user what has happened (ie the following variables have added.....).
What I need now is for this Controller page to automatically "forward" the user to the next HTML page in the questionaire.
I've tried to use the header("Location: http://www.google.com"); snippet, but this doesn't work, and I suspect this is because the Controller uses echo statements before it terminates.
To re-iterate the Controller is a big SWITCH statements, and each internal bit looks something like
case X:
output passed variables to the screen;
manipulate the variables;
stick them in the database;
and then forward to the next HTML page;
(and obviously break;)
If anyone can help, I'd be very greatful