473,836 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Flash & PHP Session

Hi,

I have an upload application written in PHP and Flash. The PHP page
gets the file information via $_POST. Moreover, the user never
actually visits the PHP page, rather Flash sends the information to the
PHP page and then loads the result, all in the background. Right now,
the php page cannot access the $_SESSION. Is there anyway that I can
conitnue the PHP session when doing this or does the user have to visit
the PHP page?

Thanks.

Steve

Aug 20 '06
10 29912
amygdala wrote:
<snip>
>>>>Is there anyway that I can
conitnue the PHP session when doing this or does the user have to visit
the PHP page?

<snip>

So basically; what I'm trying to say here is: Yes, you need flash embedded
in _a_ (not _the_) php script (within the same domain of course) to read the
cookie, and Jerry was right. ;)

As a last resort to ommitting flash put in a php file, you could use
javascript to read the cookie and append the PHPSESSID var. But you would
have to rely on the user having javascript turned on. Which is a rather big
no no.

Also, I've been out of webdeveloping for a while, so I'm not sure whether
this is still allowed by the majority of browsers anyway.

HTH
Thanks for all of your help. I ended up adding the following to the
php page to continue the session and accept the session_id from Flash:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?
  3. if (!session_id()) {
  4. if (isset($_GET['session_id'])) {
  5. session_id($_GET['session_id]);
  6. }
  7. session_start();
  8. }
  9. ?>
  10.  
  11.  
Thanks again.

Steve

Aug 22 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3157
by: Astra | last post by:
Hi All I have a Javascript to detect whether a client's browser has flash installed, but as so many people are putting me off relying on Javascript, could you please let me know if you know how to detect whether a browser has flash installed using ASP. Many thanks. Robbie
0
1542
by: Bernie | last post by:
Hi All, I have a weird problem with using flash on aspx pages. It goes like this: I have some links with query string parameters in the page. The same links appear as regular "a href" and also embeded in a flash button. like the following: <a href="/Products.aspx?level=2&prodID=26">Antibodies</a> in the flash:
5
5953
by: ASP.NET explorer | last post by:
I have been asked to create some simple animation using Adobe Flash player in ASP.NET(C#) web application. While I am fairly well versed with ASP.NET C#, I absolutely have NO IDEA about how to say "Hello World" in a Flash enabled web page rendered via ASP.NET. Can any one let me get started? ---
3
2019
by: vinceboy | last post by:
Hi..guys.I am newbie here and have a page which need to load two different flash element with session control.However something went wrong in the code and cause the first if clause is not working.I try to echo out what I want before the if clause but it displayed nothing. Thanks for your generious help.. <?php echo $_SESSION; if (isset($_SESSION)){ ?> <tr> <td colspan="2"> <div align="center">
0
5481
by: dolittle | last post by:
Hi, I'm embedding a last.fm flash widget. I want to be able to remove it from the page using javascript. I've tried to delete the html element that contains the code but it keeps playing in IE. In FF it stops playing but I can't tell if it is removed or not. Can I do it in javascript or maybe I need a FLASH script to do it?
4
4048
by: benjaminkang | last post by:
I'm very new to Coldfusion and action script, but due to job requirements, i got allocated the task of developing a cfm page where the user logs in using the embedded swf file and everything was working fine, till i decided to add the Application.cfm file for session variables. Whenever i remove the application.cfm, everything works fine.But if i add it in again, nothing works again.... *sigh* Error given out by flash is : Error opening...
0
1568
by: benjaminkang | last post by:
I'm very new to Coldfusion and action script, but due to job requirements, i got allocated the task of developing a cfm page where the user logs in using the embedded swf file and everything was working fine, till i decided to add the Application.cfm file for session variables. Whenever i remove the application.cfm, everything works fine.But if i add it in again, nothing works again.... *sigh* Error given out by flash is : Error opening...
0
10838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10250
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9369
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7788
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6977
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5645
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5821
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4447
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4010
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.