Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Flash and php3
From: Fr�d�ric Pierron / Blast Interaction
Date: Tue, 23 Nov 1999 14:06:48 GMT

Pablo,

You can get or send variables to/from a flash 4 movie with php3 exactly as
you do with html form with GET/POST method.

Here's an example with an mySQL function :

------START SCRIPT
/* Open the connexion with the database */
$hote = "serverhost";
$login = "mylog";
$pwd = "mypwd";
$table = "mydb";
$dbname = "mytable";

MYSQL_CONNECT($hote,$login,$pwd) OR
DIE("Connection pas possible ");

/* tell mySQL to use this database */
$query = "USE $dbname";
$result = MYSQL_QUERY($query);

/* Getting the variables from the flash and inserting in a table at the same
time */
/* As you can see, you do nothing special with php, all the variables you've
created with Flash */
/* are parsed automagically by the php parser */
/* So you can use it immediatly in a SQL command */


$query="
INSERT INTO $table

(myName,mySurname,myWeb,myEmail,myTel,myMetier,myDetail,myLowprice,myMiddlep
rice,myStatut,myRemarque)
VALUES
('$myName','$mySurname','$myWeb','$myEmail','$myTel','$myMetier',

'$myDetail','$myLowprice','$myMiddleprice','$myStatut','$myRemarque')";

$result = MYSQL_QUERY($query);

?>
------ END SCRIPT

What you have to do in flash :
1/ make some text box with the field flag enabled
2/ name all the text box by the name of the variables you'll catch in php
(for example, i had a text box named 'myMetier')
3/ make a button that handle the script that will send the data (Load
Movie/Load variable/send variable/post or get method)

That's all.

Caution : becarefull with the path.

Frederic


> Where can I find a tutorial explaining how to use php3 forms with flash
> objects?
>
> Pablo




flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

Reserve your space today at http://www.streamingmedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Flash and php3, Pablo Campoy

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]