can't seem to insert anything in mysql with php and flash

can't seem to insert anything in mysql with php and flash

Post by DrEv1 » Mon, 21 Nov 2005 01:31:07


I'm trying to insert a record into my database in mysql. I've made a simple
form in flash. But when I submit it doesn't do anything. As you can see in my
code I trace send_lv and everything in there is ok.

this is my php code:
<?
header("Content-type:text/xml");
//
require "db.php";
//
$gebruikersnaam = $_REQUEST["gebruikersnaam"];
$paswoord = $_REQUEST["paswoord"];
$naam = $_REQUEST["naam"];
$voornaam = $_REQUEST["voornaam"];
$adres = $_REQUEST["adres"];
$email = $_REQUEST["email"];

//
$query = "INSERT INTO
tbluser(user_id,user_naam,user_voornaam,user_adres,user_email,user_paswoord,user
_gebruikersnaam)
VALUES(?,'$naam','$voornaam','$adres','$email','$paswoord','$gebruikersnaam')";
@mysql_query($query);

?>

and here my flash:




_global.path = "http://localhost/root/merch"
//--------------------------
IKEA.root = this
//--------------------------
//REGISTER USER
//--------------------------
btnRegister_btn.onRelease = function(){
var send_lv:LoadVars = new LoadVars();
send_lv.naam = user_naam_txt.text
send_lv.voornaam = user_voornaam_txt.text
send_lv.adres = user_adres_txt.text
send_lv.email = user_email_txt.text
send_lv.gebruikersnaam =user_gebruikersnaam_txt.text
send_lv.paswoord = user_paswoord_txt.text
trace(send_lv)
send_lv.send(path+"/_php/register.php",_self,"GET");
}
 
 
 

can't seem to insert anything in mysql with php and flash

Post by * » Mon, 21 Nov 2005 04:19:09

try send_lv.sendAndLoad

http://www.yqcomputer.com/



On Sat, 19 Nov 2005 16:31:07 +0000 (UTC), "DrEv1l"

 
 
 

can't seem to insert anything in mysql with php and flash

Post by reno.rkcre » Sat, 26 Nov 2005 22:34:49

change $_REQUEST by $_GET and it may works...