Hey,
First of all, HI, just got in this place, which looks like a helpful community.
I've set up a mysql server with the latest php, mysql.
I have a flash form with name, email, and comment fields.
These are named as variables : nameField, emailField, and messageField.
I have a submit button with this script:
This is supposed to post the fields into my php file : index.php.on (release) {
Status = "Sent";
loadVariablesNum ("index.php?nameField="+nameField, 0) & ("index.php?emailField="+emailField, 0) & ("index.php?commentField="+commentField, 0);
}
Here is my index.php :
The thing is that on my mysql database I am getting 3 seperate rows all blank and only on one does the emailField get inserted.<?
include ('Include.inc');
$nameField = $_GET['messageField'];
$emailField = $_GET['emailField'];
$messageField = $_GET['messageField'];
$Connect = mysql_connect($DBhost, $DBuser, $DBpass);
@mysql_select_db("$DBName");
$query = "INSERT INTO $table (usercomment, useremail, username) VALUES ('$messageField' , '$emailField', '$nameField')";
$result = mysql_query($query);
$numR = mysql_affected_rows($Connect);
if ($numR == 0) {
print "Status=Failure, Please Fill out all Fields";
}
else if ($numR == 1) {
print "Status=Sent";
}
else { print "Status=General Error - Try Later";
}
?>
As in:
ID | usercomment | useremail | username
1 |_____________|__________|_________
2 |_____________|__________|_________
3 |_____________|____test___|_________
Please help, would be appreciated.



.
Reply With Quote
Bookmarks