hammerslane
12-02-2003, 08:46 AM
this is a simple question, hopefully with an extremely easy answer which eludes me for reasons unknown
i have a site with a simple form
the form page is called form.php and the submit page is called submit.php. submit.php mails the contents of the form.
on form.php there are a few form elements which are check boxes.<input type='checkbox' name='newsletter' value='Yes' checked>If the box is unchecked, and you press the submit button on form.php, the next page will have Notice: Undefined variable: newsletter in \\path\to\the\file\called\submit.php on line 15. [line 15 is a line which includes the contents of the form, in a mail() function]
This variable problem only exists if the box is left unticked. Is there a way to get the form to pass a value for $newsletter through the browser, even if the box isn't ticked?
many thanks.
i have a site with a simple form
the form page is called form.php and the submit page is called submit.php. submit.php mails the contents of the form.
on form.php there are a few form elements which are check boxes.<input type='checkbox' name='newsletter' value='Yes' checked>If the box is unchecked, and you press the submit button on form.php, the next page will have Notice: Undefined variable: newsletter in \\path\to\the\file\called\submit.php on line 15. [line 15 is a line which includes the contents of the form, in a mail() function]
This variable problem only exists if the box is left unticked. Is there a way to get the form to pass a value for $newsletter through the browser, even if the box isn't ticked?
many thanks.