PHP form checkbox problem.
Posted: Tue Nov 28, 2006 9:49 pm
I'm very new to PHP and I want to create a customer feedback form on a website.
Here and the relevant links:
http://www.macquariemint.com/sendmail.php
http://www.macquariemint.com/customerfeedback.html
http://www.macquariemint.com/thankyou.html
So far I've only implemented the following sections:
First Name
Last Name
E-mail Address
Street Address
City/Suburb
State
Postcode
Australian Decimal Coins and/or Banknotes check box.
What I want to happen is; a user inputs the data, its get emailed to my account and they are redirected to the thank you page.
The problem I'm having is with the check box. It works fine when the box is selected - but when its not selected I get the following error:
Notice: Undefined index: decimal in D:\Inetpub\Macquariemint\sendmail.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at D:\Inetpub\Macquariemint\sendmail.php:10) in D:\Inetpub\Macquariemint\sendmail.php on line 15
I need the data to be emailed to me and the user redirected regardless if any of the check boxes are selected or not.
Can anyone give me a hand with the check box problem I am having, it would be greatly appreciated.
Here and the relevant links:
http://www.macquariemint.com/sendmail.php
http://www.macquariemint.com/customerfeedback.html
http://www.macquariemint.com/thankyou.html
So far I've only implemented the following sections:
First Name
Last Name
E-mail Address
Street Address
City/Suburb
State
Postcode
Australian Decimal Coins and/or Banknotes check box.
What I want to happen is; a user inputs the data, its get emailed to my account and they are redirected to the thank you page.
The problem I'm having is with the check box. It works fine when the box is selected - but when its not selected I get the following error:
Notice: Undefined index: decimal in D:\Inetpub\Macquariemint\sendmail.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at D:\Inetpub\Macquariemint\sendmail.php:10) in D:\Inetpub\Macquariemint\sendmail.php on line 15
I need the data to be emailed to me and the user redirected regardless if any of the check boxes are selected or not.
Can anyone give me a hand with the check box problem I am having, it would be greatly appreciated.