Email form and PHP shortcode
-
I am setting up a basic email form. I do not want to use a mail plugin. I am trying build my own mail form using HTML and PHP. I have my html code on the page and it displays correctly. I have downloaded the Shortcode Exec PHP plugin that allows users to run PHP and have inserted, named, and saved my PHP code. My question is how do I reference this in my HTML?
A Typical HMTL form tag would be coded something like this:
<form action="sendMail.php" method="post" enctype="text/plain">What I am doing is this:
<form action="[Email]" method="post" enctype="text/plain">
where [Email] is the name that I have given my shortcode. The odd thing is that this worked once and has not worked since. Any ideas? How you would you guys make reference to the php code? If not inside the form tag, where would I add it?The following is my HTML:
<form action="[Email]" method="post" enctype="text/plain"> <input id="check1" type="checkbox" name="check1" />Print Design <input id="check2" type="checkbox" name="check2"/>Logo Design <input id="check3" type="checkbox" name="check3"/>Web Design </form>The following is my PHP:
$from="doNotReply@widdle.com"; $check1=$_REQUEST['check1']; $check2=$_REQUEST['check2']; $check3=$_REQUEST['check3']; mail("talon77email@talon77.com", "Form Submission Notice", $check1 , "From: $from"); print "Your form has been submitted";
The topic ‘Email form and PHP shortcode’ is closed to new replies.