View Full Version : flash and php....please help
kent
July 23rd, 2002, 03:03 PM
I am trying to create a login section on my flash site that sends the variables username and password to a php login page. If that login is successful I would like the php section to open in a new window. If it fails I would like flash to be directed to an error message.
Can anyone help me. I have been working on this for days and have not gotten anywhere.
thanks
Iammontoya
July 23rd, 2002, 04:19 PM
I can probably help, but I have to wait until I arrive at home tonight (that's where I use php). I'm not a pro at PHP, but I believe I can help you.
kent
July 23rd, 2002, 04:39 PM
thank you...anything would be great
jsk
July 25th, 2002, 01:00 PM
To call a php page use:
loadVariablesNum ("myPhpPage.php", 0);
To use php to update a variable called dynamicText (in this example your IP Address) in your swf you use the syntax:
<?php
$ip = $REMOTE_ADDR;
echo ("text=");
echo ($ip);
?>
You can combine both echo statements or use print() if you prefer and you can update multiple variables.
You should also consider some kind of fail safe to detect if the browser/server hangs. The simplest way to do this is to declare a variable and then have the php page update it. You can then assign a timer that checks if the variable has been updated after a pre-determined interval.
jsk
July 26th, 2002, 04:01 PM
To use php to update a variable called dynamicText (in this example your IP Address) in your swf you use the syntax:
Oops ..
The variable should be text
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.