RE: Accessing MySql using Flash while using PHP as themiddleware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fairly simple if you're using Flash MX.

In the flash movie create a LoadVars object.

	myObject = new LoadVars ();

create an onLoad event for it...

	myObject.onLoad = function () {
		trace (myObject.returnedValue);
	}

drag and drop a button component and name it myButton and add this code.

	myButton.onRelease = function () {
		_root.myObject.sentValue = "Ron"'
	
_root.myObject.sendAndLoad("myPHPpage.php",myObject,"post");
	}

now create a php page called "myPHPpage.php and include the following...

	<?php $selectedName=$HTTP_POST_VARS['sentValue'];?>
	<?php echo "&returnedValue=".$selectedName." Allen"; ?>

Don't put ANYTHING else in this PHP page.  No space, no html markup,
nothing.

That should do it.  I haven't tested the code, it just sort of flew out
of my fingers but it should would.

Doing a google search on Flash and PHP turns up tons of rescources.

Good luck!

Tim Winters
Creative Development Manager
Sampling Technologies Incorporated

1600 Bedford Highway, Suite 212
Bedford, Nova Scotia
B4A 1E8
www.samplingtechnologies.com
webmaster@samplingtechnologies.com
csnm@samplingtechnologies.com
Office: 902 450 5500
Cell: 902 430 8498
Fax:: 902 484 7115


-----Original Message-----
From: Ron Allen [mailto:Ronald.Allen@bondsteel2.areur.army.mil] 
Sent: June 25, 2003 12:15 PM
To: php-db@lists.php.net
Subject:  Accessing MySql using Flash while using PHP as the
middleware

Does anybody have an idea how-to use Flash and PHP to access a MySql
database. I know how to use PHP and mysql with no problem to pull info,
but
with Flash I am struggling.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux