Hello,
I need to get information abou one checkbox inside a HTML form. It is a option where the user check it or no, to subscribe into a newslist, and i do not know how to make the test if its checked or no in PHP.
I have trying to use JavaScript, just like the sample above, and its not working.
<SCRIPT language="JavaScript">
<!--
function IsChecked(){
if (document.Myform.checkboxname.checked) {
document.write("<?php session_register('Variable'); ?>");
}
else document.write("<?php session_unregister('Variable'); ?>");
}
// -->
</SCRIPT>
Then I set the onclick event for the input checkbox form (onClick="Ischecked();")
In the PHP script which this form is submited, i try the variable justa like that, but it´s not getting the result i want.
<?php
if (session_is_registered('Noticiario')) {
...
?>
Now, there is something easyest do do, just with PHP?
Thanks,