Flash to PHP? -
07-03-2008
, 03:59 AM
I have a flash form which sends to my php page, the 'vars' load into my
database and open a write doc and sends to email. in two "vars names".
But i can not print or echo any of the sent vars and i can not retrieve query
statements using the var names.
it is like the Vars pass straight through the php script without stopping.
there seems to be no logic why the database, email and write doc all read the
"vars" but not the echo, print or retrieval statements.
i am just being dumb? i have been trying for 3 weeks now...
// flash script
var send_lv:LoadVars = new LoadVars();
send_lv.Title = Title.text;
send_lv.Forename1 = Forename1.text;
send_lv.Surname1 = Surname1.text;
send_lv.onLoad = function(success:Boolean) {
// if the comments were sent to the server and you received a response, clear
the form fields and display an Alert message.
if (success) {
Title1.text = "";
Forename1.text = "";
Surname1.text = "";
Alert.show("Thank you for your Booking.An E Mail has been sent to your E Mail
Address Box.", "Success", Alert.OK);
} else {
// else you encountered an error while submitting to the server.
Alert.show("Unable to process your comments at this time.", "Server Error",
Alert.OK);
}
};
// send the variables from Flash to the remote PHP template.
send_lv.sendAndLoad("http://www.phupaiart.com/jon1.php",send_lv +
Forename1.text + Surname1.text,"POST");
};
this.submit_button.addEventListener("click",postBt nListener);
// php script
<?php # Script - handle_form.php
$title = $_POST['Title'];
$first_name = $_POST['Forename1'];
$last_name = $_POST['Surname1.text'];
echo "$title $first_name $last_name"
// i have tried multiple different ways and nothing appears.
// Aditionally this statement seems to be wrong... it works but displays empty
fields...
$q = "SELECT date AS text FROM honeymoon WHERE date BETWEEN '.$arrival.' AND
'.$departure.'"; |