Checkbox in PHP form
am 09.11.2009 02:39:40 von Ernie Kemp------=_NextPart_000_000A_01CA60B3.9972CAD0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_000B_01CA60B3.9972F1E0"
------=_NextPart_001_000B_01CA60B3.9972F1E0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Need some help here with checkboxes in an html form.
My issue is I have a form that needs to be viewed with checkboxes filled in
depending on the values in the table.
I tried:
echo "checked=yes"; } else { echo ''; } ?> value="PFDs"
name=f_sequipment1>PFDs
but the checkbox field is always checked.
I thought of JavaScript also but it would have to be a "if $row[33] then run
a JavaScript function" . This is not working for me neither.
Sorry if this seems trivial but I need your help.
Thanks in advance.....
------=_NextPart_001_000B_01CA60B3.9972F1E0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
charset=3Dus-ascii">
lang=3DEN-CA
link=3D"#996600" vlink=3D"#666666">
v:src=3D"cid:image001.jpg@01CA60B3.3F974090" v:shapes=3D"_x0000_Mail" =
width=3D0
height=3D0 class=3Dshape style=3D'display:none;width:0;height:0'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Need some help here with checkboxes in an html =
form.
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>My issue is I have a form that needs to be viewed with
checkboxes filled in depending on the values in the =
table.
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>I tried:
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'><INPUT class=3Dtext id=3D"myCheck1" =
type=3Dcheckbox
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;color:red'>&=
lt;?php
if ( $row[33] =3D 'no') { echo "checked=3Dyes"; } else { =
echo ''; }
?>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> value=3D"PFDs"
name=3Df_sequipment1></b><font =
size=3D"2">PFDs<b>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>but the checkbox field is always =
checked.
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>I thought of JavaScript also but it would have to be a =
“if
$row[33] then run a JavaScript function” . This is not =
working for
me neither.
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Sorry if this seems trivial but I need your =
help.
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Thanks in advance.....
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>
------=_NextPart_001_000B_01CA60B3.9972F1E0--
------=_NextPart_000_000A_01CA60B3.9972CAD0--