Hi!
I have this code on flash:
Code:
on(release){
myVars = new LoadVars();
myVars.nome = "filipe";
myVars.nick = "light";
myVars.mail = "ribeiro";
myVars.send("http://localhost/form.php", "_blank", "[GET]");
}
And the PHP code is the following:
Code:
if(!empty($_GET['nome']) && !empty($_GET['nick']) && !empty($_GET['mail']))
{
$conn = mysql_connect('localhost', 'hribeiro', 'eyewtkas') or die(mysql_error());
$db = mysql_select_db('test', $conn) or die (mysql_error());
$nome = $_GET['nome'];
$nick = $_GET['nick'];
$mail = $_GET['mail'];
$result = mysql_query("INSERT INTO users (nome, nick, mail)
VALUES ('$nome', '$nick', '$mail')") or die(mysql_error());
if($result)
{
echo "Everything is ok";
} else {
echo "Error writing data";
}
mysql_close($conn);
} else{
echo "houve aqui merda";
};
It works pretty good. However, with send() the variables will be visible in the php URL, and i dont want that. I've tried with sendAndLoad but in that way haven't managed work it out.
Can anyone help me?
Thank you