form select menu using php to jump to a page but goes into infinate loop -


(have ammended question show redirect code)

i using select menu in simple form bus tours site allow users select option , have new page load using php based on select. works fine if user clicks submit when first value selected eg 'select bus tour' should go instead seems go loop. firefox gives error:

http://hairycoo.nsdesign7.net/tour//

here form code:

$thistour = new tour($_get['id']); $tourdata = $thistour->getdata();  if ( !isset($_get['pagetile']) ) { ob_get_clean(); header('location: /tour/'.urlencode($tourdata->tours_title).'/'.$_get['id']); exit(); } 

thanks! paul

your site seems stuck in redirect loop, went url , there nothing see. suspect may issue:

if have page redirecting in absence of required $_post value, make sure if $_post data present. $_post data expire after first redirect. example:

if ( ! empty($_post)) // <--- make sure there post data {     if ( ! isset($_post['some_required_value']))     {         header('location: my/url'); // redirect     }     else     {         // process data     } } 

the content of form not related, feel free edit question , post code preforms redirect if still giving trouble.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -