# Load vars mailform question

**URL:** <https://forum.kirupa.com/t/load-vars-mailform-question/204975>\
**Category:** flash\
**Created:** [October 25, 2006, 2:28am UTC](https://forum.kirupa.com/t/load-vars-mailform-question/204975 "2006-10-25T02:28:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sader](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@sader](https://forum.kirupa.com/u/sader)\
**Post date:** [October 25, 2006, 2:28am UTC](https://forum.kirupa.com/t/load-vars-mailform-question/204975/1 "2006-10-25T02:28:13Z")

</div>

my mailform works I get an email to the specified address BUT the name and email sent in the form are empty. Basically I get a blank email. Can any of you fine gentlemen figure out what I’m missing so I get the info??  
And yes the iput text fields are labelled properly.

gracias.

Heres the code:

function validate(address)  
{  
if (address.length \>= 7)  
{  
if (address.indexOf("@") \> 0)  
{  
if (address.indexOf("@") + 2 \< address.lastIndexOf("."))  
{  
if (address.lastIndexOf(".") \< address.length - 2)  
{  
return (true);  
} // end if  
} // end if  
} // end if  
} // end if  
return (false);  
} // End of the function  
function formcheck()  
{  
if (email == null || email.length \< 1 || email == “error”)  
{  
email = “error”;  
action = “”;  
} // end if  
if (name == null || name == “error”)  
{  
name = “error”;  
action = “”;  
} // end if  
if (!validate(email))  
{  
email = “error”;  
action = “”;  
} // end if  
if (fname == null)  
{  
fname = “error”;  
action = “”;  
} // end if  
if (validate(email) && email != “ERROR!” && fname != “” && fmessage != “” && lname != “”)  
{  
action = “send”;  
loadVariablesNum(mailform, 0, “POST”);  
gotoAndPlay(2);  
} // end if  
} // End of the function  
contactOpen = 1;  
setProperty("", \_focusrect, false);  
fscommand(“allowscale”, “false”);  
mailform = “email.php”;  
confirm = “please wait for confirmation …”;  
action = “send”;  
Selection.setFocus(“fname”);  
Selection.setFocus(“fmessage”);  
stop ();

And heres the email.php:  
\<?php  
$sendTo = "mobiglsy@hotmail.com";  
$subject = “mailist”;  
$headers = “From: " . $\_POST[“name”] .” “. $\_POST[“lastname”] . “\<” . $\_POST[“email”] .”\>  
";  
// next include a replyto  
$headers .= "Reply-To: " . $\_POST[“email”] . "  
";  
$headers .= "Return-path: " . $\_POST[“email”];

// now we can add the content of the message to a body variable  
$body = $\_POST[“message”];

mail($sendTo, $subject, $body, $headers);

?\>
