Re: get or post



JRough wrote:
Below is the view source for a php page with a template. The user
selects the option they want. That id option value gets input from
this redirect code and those cars get displayed. The value in the
form I am interested in is "all cars" which has the value of
current_sightings.php which is the same as PHP_SELF. So it doesn't
meet the elseif condition. In this case does that mean this id value
doesn't get posted in the session? It does appear in the url when the
page is hit. I need to capture that value or at least figure out why
it works for customer and not for owner and internal users. A session
value would help more than a get but I need to make sure I get that
$id value the user selects in this case it is 73, 117, 108 etc.
After this selection there is a case statement and different selects
according to which user is logged and different pages gets drawn with
a different template carlist. I would like to make certain this $id
field is getting posted or not. this elseif is hard to understand. I
can give you the whole page of code but it is hard to understand.
thanks,


}elseif($_POST['redirect']&&$_POST['redirect']!=$_SERVER['PHP_SELF']){
Header("Location: ".$_POST['redirect'].".php?id=".$_POST['id']);


<input type='radio'> name='redirect' value='current_sightings' checked>


Actually the ifelse statement is true because the value of the redirect radio button is 'current_sightings' not 'current_sightings.php'

The PHP_SELF will be 'current_sightings.php'

This is assuming the code posted does not have a typo.

Scotty
.


Quantcast