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
Post a Comment