View Single Post
Old 03-14-2005, 04:27 AM   #7 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 651
DJMaze is on a distinguished road
Code:
<?php
$Mydata = array(
  'user_id' = 0,
  'password' = 0
);
foreach ($Mydata as $key => $value) {
  if (isset($_POST[$key])) $Mydata[$key] = htmlentities($_POST[$key]);
}
?>
User ID: <input type="text" name="user_id" size="20" tabindex="2"
maxlength="127" value="<?php echo $Mydata['user_id'];?>" />
I use <?php and ?> all the time ON PURPOSE.
The short notation <? is not recognized on several systems when the php.ini value "short_open_tag" is set to 'Off'
DJMaze is offline   Reply With Quote