I am trying to create a customer-selectable package deal. Basically the customer can configure their own package deal and send it as an email. So basically, I need to have a radio button and text box form within the product description:
I have tried few custom email forms; however, since they contain php code above the HTML, when I save all of it in the product description, it shows all the PHP code as well as html, rendering it unusable.Code:<div itemprop="description" id="productDescription" class="productGeneral biggerText"> </div>
Sample HTML Form that I have tried:
Code:<?php if($_POST["submit"]) { $recipient="[email protected]"; $subject="Form to email message"; $sender=$_POST["sender"]; $senderEmail=$_POST["senderEmail"]; $message=$_POST["message"]; $mailBody="Name: $sender\nEmail: $senderEmail\n\n$message"; mail($recipient, $subject, $mailBody, "From: $sender <$senderEmail>"); $thankYou="<p>Thank you! Your message has been sent.</p>"; } ?><!DOCTYPE html> <?=$thankYou ?> <form method="post" action="contact.php"> <label>Name:</label> <input name="sender"> <label>Email address:</label> <input name="senderEmail"> <label>Message:</label> <textarea rows="5" cols="20" name="message"></textarea> <input type="submit" name="submit"> </form>


Reply With Quote

