kim_foxx
Member
- Messages
- 84
- Reaction score
- 0
- Points
- 6
I cant seem to get the users email to be sent to me... Whenever a user fill in the box i get their name and their message but not the email that they supplied... Can anyone see anything wrong with the code?
Thanks in advanced.
HTML:
<p align="left">Email:<br >
<input name="email" id="email" size="40" >
------------
<?php
function is_valid_email($from_email)
{
return preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s\'"<>]+\.+[a-z]{2,6}))$#si', $from_email);
}
$to_email = "XXXX@hotmail.com";
$subject = "secret";
$name.=$_POST['name']."\n" ;
$from_email.=$_POST['email']."\n" ;
$msg.=$_POST['message']."\n" ;
$message = "
Name:
$name
Email:
$email
Message:
$msg
";
Thanks in advanced.
HTML:
<p align="left">Email:<br >
<input name="email" id="email" size="40" >
------------
<?php
function is_valid_email($from_email)
{
return preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s\'"<>]+\.+[a-z]{2,6}))$#si', $from_email);
}
$to_email = "XXXX@hotmail.com";
$subject = "secret";
$name.=$_POST['name']."\n" ;
$from_email.=$_POST['email']."\n" ;
$msg.=$_POST['message']."\n" ;
$message = "
Name:
$name
Email:
Message:
$msg
";