get or post
- From: JRough <jlrough@xxxxxxxxx>
- Date: Tue, 30 Dec 2008 16:28:58 -0800 (PST)
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']);
----template form in view source------
<form action="/current_sightings.php" method="post">
<th>Active Leases</th><th>Show Only</th>
<tr>
<td align='center'><SELECT name='id' class=box size=8>
<OPTION VALUE='73' class='trbg' >L001-01 - Lehigh Cement
Company</OPTION>
<OPTION VALUE='117' >L001-03.1 - Lehigh Cement Company</
OPTION>
<OPTION VALUE='108' class='trbg' >M002-03C - Martin Marietta
Materials, Inc.</OPTION>
<OPTION VALUE='75' >B001-01 - Poet Nutrition, Inc</OPTION>
<OPTION VALUE='88' class='trbg' >B001-02 - Poet Nutrition,
Inc</OPTION>
<OPTION VALUE='74' >S001-01 - Superior Well Services</OPTION>
<OPTION VALUE='89' class='trbg' >S001-02 - Superior Well
Services</OPTION>
<OPTION VALUE='115' >S001-03 - Superior Well Services</OPTION>
<OPTION VALUE='116' class='trbg' >S001-04 - Superior Well
Services</OPTION>
</SELECT>
</td>
<td valign='top'>
<table width="100%" border="0" cellspacing="0"
cellpadding="2">
<tr>
<td align='center'><input type='radio'
name='redirect' value='current_sightings' checked></td><td>All Cars</
td>
</tr>
<tr>
<td align='center'><input type='radio'
name='redirect' value='cars_by_location_summary'></td><td>Cars By
Location</td>
</tr>
<tr>
<td align='center'><input type='radio'
name='redirect' value='idle_cars'></td><td>Idle for 3 Days</td>
</tr>
<tr>
<td align='center'><input type='radio'
name='redirect' value='bad_order'></td><td>Bad Orders</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<input type="submit" class="button" name="assign"
value="View these Cars">
</td>
.
- Follow-Ups:
- Re: get or post
- From: FutureShock
- Re: get or post
- From: FutureShock
- Re: get or post
- Prev by Date: Re: sorting columns in a client-side page
- Next by Date: Re: get or post
- Previous by thread: Result Sets
- Next by thread: Re: get or post
- Index(es):