LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-23-2004, 08:24 PM
jpwrunyan's Avatar
jpwrunyan jpwrunyan is offline
Registered User
 
Join Date: Jul 2004
Location: Japan
Posts: 35
Rep Power: 0
jpwrunyan is on a distinguished road
loadVars send with PHP HOW DO YOU DO IT?!

How do you do the extremely simple task of sending vars from Flash to a PHP script to then insert into a database?

I have looked at countless examples and none of them seem to work!
Can someone please give me a working example? Nothing fancy... I just want to send vars to a php script which I then want to use to insert information into the database.

Actionscript:
dbinfo = new LoadVars();
dbinfo.insertWhere=2;
dbinfo.newName="my name";
dbinfo.newAge="27";
dbinfo.send("changeDB.php", "", "POST");

This above code should create a new LoadVars object, give it the values of insertWhere (the entry I want to change), newName (the name to put into the entry, replacing the old one), and newAge (ditto). Now, I don't need anything back... I just want to change the DB. Right now it keeps opening a new window which I don't want as well as just outright not working....

My PHP code is as follows:

PHP Code:

<?php 


$db 
mysql_connect("server.net""user""password");
$newname=$_POST['sendName'];
$newscore=$_POST['sendScore'];
$changerank=$_POST['sendRank'];
$querryText="UPDATE `top10` SET `name` = $newname,`score` = $newscore,`shipConfig` = 'did this work?' WHERE `rank` = $changerank;

mysql_select_db("pwrdb",$db); 
mysql_query($querryText,$db);

?>
Please note this is merely an example of my latest failure... I have tried a ton of different things and none of them work. Someone please help me!

Last edited by Scottae : 07-13-2005 at 04:28 PM Reason: Format with AS and PHP tags
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loadvars with PHP pcdf Actionscript 2.0 0 05-08-2008 06:23 PM
Flash LoadVars PHP - Flash Version? GobLox Flash 8 0 06-05-2007 06:54 PM
Mail with LoadVars and php, help... yodaa Flash Media Server 0 04-25-2005 11:44 PM
PHP + Flash + LoadVars Issue masster Web Platforms - PHP, JSP and .NET 16 04-14-2005 03:14 PM
LoadVars or XML with PHP on DIFFERENT servers doesn't work. sckz Server Side 4 02-11-2004 04:30 PM




All times are GMT. The time now is 09:00 AM.