Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Flash + PHP: How can I transfer vars?
Damen
post May 26 2007, 02:40 AM
Post #1


Super Member
*********

Group: [HOSTED]
Posts: 245
Joined: 9-April 07
From: Nebraska
Member No.: 41,342



I am making a little section for a friends website.

Here is what I have so far.

:SWF File here:

And I made it you match the layout of here site.

Here

As you can see I pretty much have the layout of it down. Some little bugs to be worked out with characters allowd in the text boxes and what not. But I have a good platform.

NOW for the fun part!

Getting vars from flash to send, via POST, to PHP. I have been trying to find a good tutorial on this online but I am not having such great outcomes!

So if anyone can help me here please go for it!

This is exactly what I am looking for.

A way to pass vars from a flash swf(embeded in a .php file) to the PHP via a sumbit button on the SWF, then have the variable saved into a corisponding section in a DB.

I don't need any help with getting it saved to a DB, if anyone can get me to a point where as I can echo the variable in the PHP file and it show the one from the SWF file I am good as gold.

SO PLEASE! If anyone knows any tid bits of information I would be honored!

THANKS
Go to the top of the page
 
+Quote Post
rvalkass
post May 26 2007, 07:31 AM
Post #2


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,153
Joined: 28-May 05
From: Devon, England
Member No.: 7,593
Spam Patrol



I believe you use the loadVariablesNum function. I haven't done any Actionscript for a little while, so this may not work perfectly, but I believe you do something like this:

CODE
varFirst = "one";
varSecond = "two";

loadVariablesNum("page.php?varFirst="+varFirst+"&varSecond="+varSecond", 0, "POST");


Despite it using a URL that looks like it uses GET, it should still use POST to send the variables across to the PHP script. They can then be used in PHP as $_POST['varFirst'] and $_POST['varSecond'].

This post has been edited by rvalkass: May 26 2007, 07:31 AM
Go to the top of the page
 
+Quote Post
Damen
post May 28 2007, 09:27 PM
Post #3


Super Member
*********

Group: [HOSTED]
Posts: 245
Joined: 9-April 07
From: Nebraska
Member No.: 41,342



Thanks, so I will set the textboxes in flash to store there var right? Then send it?
Go to the top of the page
 
+Quote Post
rvalkass
post May 29 2007, 02:55 PM
Post #4


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,153
Joined: 28-May 05
From: Devon, England
Member No.: 7,593
Spam Patrol



I don't think it matters where you have the variables stored, as long as you pass them in the way I have shown to the PHP script. I am sure that setting the text boxes to store their content in the variables would work just fine, but I have no way to test it at the moment.
Go to the top of the page
 
+Quote Post
Blessed
post May 30 2007, 05:58 PM
Post #5


Advanced Member
*******

Group: Members
Posts: 144
Joined: 22-March 07
Member No.: 40,472



Greetings

thanx for this man
it really helps me allot.
will try it.

have a nice day biggrin.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How To Transfer Files Directly From My Computer To The Trap17 Account(6)
  2. What is the best USB Flash Disk outhere?(9)
  3. Playing Flash Movies Without The One-click Activation: Simple Insertion Of Javascript(4)
  4. Which Flash Drive Do You Use?(26)
  5. Balloon Duel - Flash Game(2)
  6. Flash Action Scripting Help Needed(6)
  7. Ie And Firefox Crash(5)
  8. Flash And Transparency(7)
  9. Flash Video Recorder(2)
  10. Free (legal) Flash Editor? Anyone?(9)
  11. How Much Money Did U Spend In Transfer Mode And Who On? Fifa 08(5)
  12. I Need Some Help With Flash And Div Overlay(5)
  13. Flash Tutorial Simple Motion Tween(0)
  14. Virus On Your Flash Disk? (usb Devices)(15)
  15. Delay X Seconds In Flash(1)
  1. Adobe Flex/flash/actionscript Forum(1)
  2. Photoshop, Flash And Fireworks Tutorial Site Links(2)
  3. Flash As3 Question(2)
  4. Flash Header Edit?(2)
  5. Flash Actionscript Help(10)
  6. How To Get High Quality Gif Images In Flash(1)
  7. Scroll And Pan The Screen Via Mouse In Flash(1)
  8. Flash Games...(8)
  9. Flash, Php And Facebook Integration(0)
  10. Toufee.com - Create Free Flash Movies Online(3)
  11. Cms For Video, Embedding Flash(2)
  12. Flash Movie As Background?(20)
  13. Adding Flash Music Player To Home/any Page(4)
  14. Windows Vista License Transfer?(10)
  15. Flash Games(4)


 



- Lo-Fi Version Time is now: 12th October 2008 - 08:57 PM