I have an array of facilities, how do I define them all in one go so I do 
not get the undefined index error?


input name="facilities[5] " type="checkbox" id="facilities[5] " 
value="Credit Cards Accepted" <?php if ($_POST['facilities'][5]!='') { echo 
'checked="checked" '; }?>>
      Credit Cards Accepted </td>
    <td><input name="facilities[6] " type="checkbox" id="facilities[6] " 
value="Towels" <?php if ($_POST['facilities'][6]!='') { echo 
'checked="checked" '; }?>>
      Towels </td>
    <td><input name="facilities[7] " type="checkbox" id="facilities[7] " 
value="Luggage Storage" <?php if ($_POST['facilities'][7]!='') { echo 
'checked="checked" '; }?>>
      Luggage Storage </td>
    <td><input name="facilities[8] " type="checkbox" id="facilities[8] " 
value="Telephone/Fax Facilities" <?php if ($_POST['facilities'][8]!='') { 
echo 'checked="checked" '; }?>> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to