Morning,
I have a form that has 2 fields I want to remember. I am having the hardest time trying to get it to do so. Heres what I have:
<?
session_start();
header("Cache-control: private"); // IE 6 Fix.
$Source = $POST['rowdata[]Source'];
$Location = $POST['rowdata[]Location'];
// Register session key with the value
$SESSION['Source'] = $Source;
$SESSION['Location'] = $Location;
//some code
<?PHP
for ($cnt=0;$cnt<$lngNumRows;$cnt++) {
?>
<tr>
<td>
<select name="rowdata[<?PHP echo $cnt; ?>][Source]" size="1">';
<? foreach($arrFacilities as $key => $value) {
echo '<option value="'.$key.'"';
echo ($_SESSION['Source'] == $key) ? ' selected' : '';
echo '>'.$value.'</option>';
}
?>
</select>
</td>
<td>
<input name="rowdata[<?PHP echo $cnt; ?>][Location]" type="text" value="<? echo $_SESSION['Location']; ?>" size="5">
</td>
<td>
Any ideas would be appreicated.
Thanks
Laura