MrJ
07-30-2007, 01:02 PM
I've been looking through the web all weekend, and all I can find is how to receive variables from a MySQL DB, or some type of guestlist, etc.. Basically I have a form with two fields: Full Name and Email. I knows it simple because I did it back during MX 2004, I just forgot. :p
Now I am using CS3 with phpMyAdmin, and here is my code:
Actionscript for Regster button:
on (release) {
var myVar = new LoadVars();
myVars.clientname = clientname.text;
myVars.uemail = email.text;
myVars.SendandLoad("glsitadd.php",myVars,"POST");
gotoAndStop(2);
}
And my PHP Code:
<?php
$connection = mysql_connect("serveraddy goes here",
"dbusername goes here",
"dbpassword goes here");
mysql_select_db("EmailL", $connection);
$name=$_POST['clientname'];
$email=$_POST['uemail'];
$sql = 'INSERT INTO `EmailL`.`Email` (`name` ,`email` )VALUES ($name, $email);';
mysql_query($sql);
?>
Thanks!
Now I am using CS3 with phpMyAdmin, and here is my code:
Actionscript for Regster button:
on (release) {
var myVar = new LoadVars();
myVars.clientname = clientname.text;
myVars.uemail = email.text;
myVars.SendandLoad("glsitadd.php",myVars,"POST");
gotoAndStop(2);
}
And my PHP Code:
<?php
$connection = mysql_connect("serveraddy goes here",
"dbusername goes here",
"dbpassword goes here");
mysql_select_db("EmailL", $connection);
$name=$_POST['clientname'];
$email=$_POST['uemail'];
$sql = 'INSERT INTO `EmailL`.`Email` (`name` ,`email` )VALUES ($name, $email);';
mysql_query($sql);
?>
Thanks!