Hi guys, I spent quite a bit time trying to get an opt in form worked on my new ecommerce website. I know nothing about php..:confused: This is the form:
Need help for a simple php email script or opt in!
15
Hi guys, I spent quite a bit time trying to get an opt in form worked on my new ecommerce website. I know nothing about php..:confused:
This is the form:
<form name="form" action="send_form_email.php" method="post">
<input name="subject" type="text" id="subject" value="Join Our Email List" " onfocus="if(!this._haschanged){this.value=''};this ._haschanged=true;" />
<input type="submit" name="submit" value="Submit" class="button" /> </form>
This is the php i used
<?php
// Contact subject
$subject ="$subject";
// Details
$message="$detail";
// Mail of sender
$mail_from="$customer_mail";
// From
$header="from: $name <$mail_from>";
// Enter your email address
$to ='myemail@mysitemail.com';
$send_form_email=mail($to,$subject,$message,$heade r);
// Check, if message sent to your email
// display message "We've recived your information"
if($send_form_email){
echo "We've recived your contact information";
}
else {
echo "ERROR";
}
?>
I have tried so many times , it didn't work for me.
I only need an email field and a submit button. still i didn't make it work.
Someone please help me.
I don't intend to have many subs. I only want something that does the work.
This is the form:
<form name="form" action="send_form_email.php" method="post">
<input name="subject" type="text" id="subject" value="Join Our Email List" " onfocus="if(!this._haschanged){this.value=''};this ._haschanged=true;" />
<input type="submit" name="submit" value="Submit" class="button" /> </form>
This is the php i used
<?php
// Contact subject
$subject ="$subject";
// Details
$message="$detail";
// Mail of sender
$mail_from="$customer_mail";
// From
$header="from: $name <$mail_from>";
// Enter your email address
$to ='myemail@mysitemail.com';
$send_form_email=mail($to,$subject,$message,$heade r);
// Check, if message sent to your email
// display message "We've recived your information"
if($send_form_email){
echo "We've recived your contact information";
}
else {
echo "ERROR";
}
?>
I have tried so many times , it didn't work for me.
I only need an email field and a submit button. still i didn't make it work.
Someone please help me.
I don't intend to have many subs. I only want something that does the work.
- innozemec
- [2] replies
- Giselle85G
- Giselle85G
- David V
- FirstSocialApps
- [2] replies
- webily
- webily
- [1] reply
- Giselle85G
- FirstSocialApps
- festi9
- festi9
- [1] reply
- Giselle85G
Next Topics on Trending Feed
-
15