Ok, I am slowly getting somewhere. When I click the enter button now the page does a cannot find server error page with the link showing as the contactscript.php which it is not running. it is just trying to open that page.
Also it still isnt going into my mysql this is where I am at with the code. Is there a code I need to add so that the page I can move to another flash page once the request is completed. Also is there something wrong with my php hence why it is not sending?
I have changed the vars to myname, mycontact, myabout, mymessage
and the instance is still sendmessage for the submit button.
The flash code has been applied by right clicking on the layer and going into actions on the contact form.
var submitObject:LoadVars = new LoadVars();
sendmessage.onRelease = function():Void
{
submitObject.myname = myname.text;
submitObject.mycontact = mycontact.text;
submitObject.myabout = myabout.text;
submitObject.mymessage = mymessage.text;
submitObject.send("http://WEBSITE.com/contactscript.php", "_self", "POST");
};
and php code is as follows (I have changed the table name to contacts).
<?php
$conn = mysql_connect("local host", "username", "password");
mysql_select_db("blc", $conn);
$myname = $_POST['myname'];
$mycontact = $_POST['mycontact'];
$myabout = $_POST['myabout'];
$mymessage = $_POST['mymessage'];
$query="INSERT INTO contacts values ('', '$myname', '$mycontact', '$myabout', '$mymessage')";
$sql_run = mysql_query($query, $conn) or die(mysql_error());
?>