Jul 25, 2008

Flash + PHP: How can I transfer vars?

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Flash + PHP: How can I transfer vars?

Damen
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

 

 

 


Reply

rvalkass
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'].

Reply

Damen
Thanks, so I will set the textboxes in flash to store there var right? Then send it?

Reply

rvalkass
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.

Reply

Blessed
Greetings

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

have a nice day biggrin.gif

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : flash php transfer vars

  1. Flash And Php - How? (5)
  2. Transfer Variables To Another Php Script - (8)
    Hello, I've one registration page where the users fills in their information, is it possible to
    trasnfer the things the fill in on the registration page to another script that does someting and
    returnes something to the first page like true/false and then the registration gives an error
    messange if the other php script returned false? Something like the script "activates" another
    script that does something and returnes the result back to the original script. Best Regards ...
  3. Php And Flash Image Gallery - Need some help in creating or editing an xml file while viewing some o (5)
    Hello there and thanks for the helping hand you are offering. PHP newbie here! /ph34r.gif"
    style="vertical-align:middle" emoid=":ph34r:" border="0" alt="ph34r.gif" /> So here is my problem:
    On my website I have a flash image gallery.The way the gallery works is by uploading pictures in a
    folder and editing? an xml file.(pics.xml) where it adds the following code when you upload a
    picture: CODE <pictures>     <image location="nameofpicture1.jpg"
    desc="" />     <image location="nameofpicture2.jpg" desc="" /&#...
  4. Flash With Php - (1)
    Is it possible pass flash variables to be processed in PHP language? Example: Enter Login and
    password in a flash aplication and this variables (login and password) to be used in PHP?...
  5. Compare Two Vars And Highlight The Differences - (7)
    I need a script that compares 2 variables, and looks for a difference between them. It will then
    highlight the words that are different, as shown in the image below: So in the left cell, the
    yellow text is the text that has been removed OR replaced. In the right cell, the green text is the
    text that has replaced some text in the left cell, OR new text. This script will be used to
    compare 2 versions of a document stored in the database, to see the difference between each change
    (all revisions are stored in the database). I know that it's possible with PHP, beca...
  6. Problem With $http_post_vars - (3)
    I have a piece of code on one server that works and the same piece of code on another server does
    not. The difference is in the PHP verison & the Linux verison The one that works runs PHP4 on Redhat
    Linux. The one that doesn't runs PHP5 on SUSE Linux. Not sure if this is where the issue lies or
    not. I do know that in one case I see an adrress in searchable and in the other case it is null.
    PHP Code: CODE if ($HTTP_POST_VARS[addr]) {     $searchable =
    $HTTP_POST_VARS[addr];     echo "searchable = ".var_dump(...
  7. Simple Chat - simple flash mx/php/mysql chat (8)
    Has anyone here done a flash/php/mysql chat project? I have a few flash projects I could use some
    help with getting one of them to work.I would like to start with a simple chat that I picked up at
    http://www.sephiroth.it/tutorials/flashPHP..._chat/index.php I'm able to edit the fla file ok,
    and know a little about php, and mysql, but this is the first time I have done a dynamic site, and
    could use some help with it to get it installed on the server,and get it to work.I have tryed on my
    own for awhile now with it, and it seems I'm on the ratty edge of getting it...
  8. Flash Portal Script - (3)
    Hello! Does anybody knows the Flash portal script. I can see that more and more websites have
    their own flash portal like newgrounds.com, smosh.com, antitudegames.com. anyone can help?...
  9. Php And Flash Movie Ie Problem - php include problem (2)
    I'm working on a site right now and everything's working fine. I had all the links and
    includes working but when i check the site in ie i found that the small flash movie which is part of
    the header and is included in the top php, isn't loading. Anyone here ever had that problem. I
    don't remember ever myself but i really need this stupid thing fixed. round ...
  10. Mambo Migrating - to Flash? (1)
    I know that flash has the capability to use PHP scripts to bring up information. I have currently a
    Mambo site that has alot of information stored in MySQL database. Is it possible to adapt the
    database to pull up the information from the site?...
  11. Need Help Generating Flash Movie With Ming Library - Please? (0)
    I am doing a school project and the guy I am doing it with want some animations. Since gif
    animations are not supported by php (patent trouble) I had to make a flash movie. I allready have
    the basic code and stuff but the images I try to import in my flash movie don't show. I am
    trying to use a gameboard as background for the movie. After the TODO comment I am going to edit the
    image so I get an animation, but first things first so this is my code: CODE <?php
    //invoer: //array met posities van de huizen $huis //array met posities van de hotels ...
  12. Quick Question About Session Vars - something I can't find anywhere (1)
    Can you save stuff like classes and arrays in sessionsvariables?...
  13. Flash Games And Post Data - (0)
    i want to put a highscore section for a bunch of flash games on a website. i know that when most
    games are done the score is in the post data, which can be viewed if you have the firefox live http
    headers extension. but how would you insert the postdata from the flash games into the database?...
  14. PHP flash - (7)
    function label($string) { global $f; $t = new SWFTextField();
    $t->setFont($f); $t->addString($string); $t->setHeight(200);
    $t->setBounds(4000,200); return $t; } function addLabel($string) {
    global $p; $i = $p->add(label($string)); $p->nextFrame();
    $p->remove($i); } function rect($r, $g, $b, $signal)//buttonstyle
    { $s = new SWFShape(); if($signal==0) { $s->setRightFill(...



Looking for flash, php, transfer, vars,

Searching Video's for flash, php, transfer, vars,
advertisement



Flash + PHP: How can I transfer vars?



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE