Trying to teach myself PHP, but ran into a little problem which I haven't been able to solve. I don't think it's a big problem, but for the moment it's a bit above my head and I need some guidance here... Please. My form consist of four checkboxes, those selected are suppose to remain checked after the user click "submit". The thing is that I don't capture the values in a correct fashion. Take a look please...
Code: Select all
<FORM ACTION = "?PHP $_SERVERї'PHP_SELF] ;?>" METHOD = "GET">
<INPUT TYPE = "CHECKBOX" NAME = "profileї]"
<?PHP IF($profile == "on"){ECHO checked;}?>>
<?PHP echo $String1 ;?><BR>
<INPUT TYPE = "CHECKBOX" NAME = "profileї]"
<?PHP IF($profile == "on"){ECHO checked;}?>>
<?PHP ECHO $String2 ;?><BR>
<INPUT TYPE = "CHECKBOX" NAME = "profileї]"
<?PHP IF($profile == "on"){ECHO checked;}?>>
<?PHP ECHO $String3 ;?><BR>
<INPUT TYPE = "CHECKBOX" NAME = "profileї]"
<?PHP IF($profile == "on"){ECHO checked;}?>>
<?PHP ECHO $String4 ;?><BR>
<INPUT TYPE = "SUBMIT" NAME = "submit" VALUE = "Update">
</FORM>
<?PHP IF($submit){
for($i = 0; $i < count($profile); $i++){
if(isset($profileї$i]){
$profile = "on" ;
}
}
}
;?>