sethupathy Posted June 14, 2007 Share Posted June 14, 2007 in a form i ask the client if they want to use form for type of comapnie 1 or 2 i have been using php to redirect but i am having problem using header can someone tell me how would i do this using java <?php $choice = $_POST['type']; //Use addslashes( ); around the $_POST var to increase security if( $choice == "1" ){ header( 'location: /company1.html' ); exit; } if( $choice == "2" ){ header( 'location: /company2.html' ); exit; } ?> PLS HELP Link to comment https://forums.phpfreaks.com/topic/55619-help-redirection/ Share on other sites More sharing options...
nogray Posted June 14, 2007 Share Posted June 14, 2007 change the exit statment to something like this exit("<script language=\"javascript\">location.href=\"company1.html\";</script>If you are not redirected in 2 seconds, please <a href=\"company1.htmt\">click here</a>"); Link to comment https://forums.phpfreaks.com/topic/55619-help-redirection/#findComment-275000 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.