# What am i missing here? SUBJECT: loadVars problem

**URL:** https://forum.kirupa.com/t/what-am-i-missing-here-subject-loadvars-problem/122438
**Category:** Uncategorized
**Created:** [September 13, 2004, 7:27pm UTC](https://forum.kirupa.com/t/what-am-i-missing-here-subject-loadvars-problem/122438 "2004-09-13T19:27:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Azazel](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Azazel](https://forum.kirupa.com/u/Azazel)
#### Post date: [September 13, 2004, 7:27pm UTC](https://forum.kirupa.com/t/what-am-i-missing-here-subject-loadvars-problem/122438/1 "2004-09-13T19:27:44Z")

</div>

ok, i’m trying to make a “check function” for an email form…

This is the code:

frame 1:

[COLOR=Red]System.useCodepage=true;  
name = “”;  
email = “”;  
input = “”;  
input1.tabIndex = 1;  
input2.tabIndex = 2;  
input3.tabIndex = 3;  
error = “forget something?”;  
function formcheck() {  
if ((name == null) || (name == “”)) {  
name = error;  
action = “”;  
}  
if ((input == null) || (input == “”)) {  
input = error;  
action = “”;  
}  
if ((name != “”) && (name != error) && (input != “”) && (input != error)) {  
name = input1.text;  
email = input2.text;  
webb = input3.text;  
gotoAndPlay(“sending”);  
}  
}  
stop();[/COLOR]

submit button on frame 1:  
[COLOR=Red]on (release){  
formcheck ();  
}[/COLOR]

frame 10:  
[COLOR=Red]myData = new LoadVars();  
myData.load(“mail.php” + “&name=” + name + “&email=” + email + “&input=” + input, myData, “POST”);  
myData.onLoad = function () {  
if (myData.result == “okay”) {  
\_root.enter.level1.motion.contact\_mc.cont\_level2\_mc.contactform\_mc.gotoAndStop(“good”);  
} else {  
gotoAndStop(“error”);  
}   
}  
stop();[/COLOR]

and this is the PHP:

\<?php

[COLOR=Red]$name = $\_GET[“name”];  
$email = $\_GET[“email”];  
$input = $\_GET[“input”];  
if (!isset($name) || !isset($input) || empty($name) || empty($input)){  
print “&result=Fail”;  
print “&errorMsg=” .urlencode(“forgett something?”);  
exit;  
}

$send = “info@frameset.se”;  
$subject = “Mail från hemsidan”;

$headers = "Från: " . $\_POST[“name”];

$headers .= “\<” . $\_POST[“email”] ."\>  
";

$headers .= "svara: " . $\_POST[“email”];

$input = $\_POST[“input”];

$input = strip\_tags("$input");  
$headers = strip\_tags("$headers");

mail($send, $subject, $input, $headers);  
print “&result=okay”;  
exit;  
?\>[/COLOR]

But it just goes to the “error” frame (frame 10)!!! what am i missing??!!? :h:
