Fixed register_globals

This commit is contained in:
root 2008-08-25 20:09:21 +00:00
parent 7b3ab5121e
commit f5c07defe5

View file

@ -22,7 +22,7 @@
</tr> </tr>
<tr> <tr>
<td class="DataTD" width="125"><?=_("Email Address")?>: </td> <td class="DataTD" width="125"><?=_("Email Address")?>: </td>
<td class="DataTD" width="125"><input type="text" name="email" value="<?=$_SESSION[lostpw][email]?>"></td> <td class="DataTD" width="125"><input type="text" name="email" value="<?=array_key_exists('lostpw',$_SESSION)?sanitizeHTML($_SESSION['lostpw']['email']):""?>"></td>
</tr> </tr>
<tr> <tr>
<td class="DataTD"><?=_("Date of Birth")?><br> <td class="DataTD"><?=_("Date of Birth")?><br>
@ -32,8 +32,8 @@
for($i = 1; $i <= 31; $i++) for($i = 1; $i <= 31; $i++)
{ {
echo "<option"; echo "<option";
if($_SESSION[lostpw][day] == $i) if(array_key_exists('lostpw',$_SESSION) && $_SESSION['lostpw']['day'] == $i)
echo " selected"; echo " selected=\"selected\"";
echo ">$i</option>"; echo ">$i</option>";
} }
?> ?>
@ -43,13 +43,13 @@
for($i = 1; $i <= 12; $i++) for($i = 1; $i <= 12; $i++)
{ {
echo "<option value='$i'"; echo "<option value='$i'";
if($_SESSION[lostpw][month] == $i) if(array_key_exists('lostpw',$_SESSION) && $_SESSION['lostpw']['month'] == $i)
echo " selected"; echo " selected";
echo ">".ucwords(strftime("%B", mktime(0,0,0,$i,1,date("Y"))))."</option>"; echo ">".ucwords(strftime("%B", mktime(0,0,0,$i,1,date("Y"))))."</option>";
} }
?> ?>
</select> </select>
<input type="text" name="year" value="<?=$_SESSION[lostpw][year]?>" size="4"></nobr> <input type="text" name="year" value="<?=array_key_exists('lostpw',$_SESSION)?sanitizeHTML($_SESSION['lostpw']['year']):""?>" size="4"></nobr>
</td> </td>
</tr> </tr>
<tr> <tr>