Hi all first post to the forum.
I have been developing a form that has many radio buttons and have managed to output this to email using Php. Now I thought I would be clever and use check boxes for a question on credit card types.The user may have more than one card. I have spend three weekends now trying to get some Php code to make it output to the email. But this seems to be a different ball game. Although I have managed to get the radio buttons working I can not program in Php. I thought I got close on a number of occasions with the check box and had an email that displayed "Array" instead of the checked box values. Now I am quite confused. If any one could help with some Php for this I would be most grateful. This is my form without the submit side of it.
Note that a checkbox POST value will be null if it is not checked, it will be undefined.
What does the following code print once you click on submit?
█ Fraud Record - Stop Fraud Clients, Report Abusive Customers.
█ Combine your efforts to fight misbehaving clients. █ HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though. █ Large and awesome portfolio, just visit and see!
Hi Enerqizer Bunny,
Thanks again I do appreciate the help. I do not have "credit" in the code any where else on the form. The only other place it is used is in text on the form. This is the php code as I tried it:
$Credit = implode(", ", $_POST['Credit']);
echo '<br/><b>Credit:</b> ';
This is the error:
Parse error: parse error, unexpected T_IF in /var/www/vhosts/website.com/httpdocs/joinmail.php on line 250
This is at the end of the form:
I think this is the send bit of the form. At the begining it has this
This takes a user to the thank you page.
I hope this gives you a better picture.
Before I tried to add credit card info (Check Boxes) the form worked perfectly. The whole form is made up with radio buttons. I changed the forms Credit card button "Yes" or "No" to The Check boxes so users could indicate what Cards they have/use. So the code as described was added in the place where I had the radio buttons for credit cards.I thought it would be straight forward but no. As the form worked I can only assume that the problem is with the added code for check boxes.
What i am trying to get at is , you cannot have html in php code without proper echoing the html part, i use mostly echo ' somehtmlcode' ; seems like here you are missing and are using format echo " somehtmlcode " ; and that td statement is not enslosed in an echo statement.
Cause you cannot insert html in php without echoing it.
@CanSpace , sorry but html can have w/e you can throw at it. And form fields do take .