CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 retrieving a PHP session variable in Java

Print topic Send  topic

Author Message
Garfieldus

Posts: 40
Posted: 03/08/2006, 9:23 AM

Can someone please give me an example of how to retrieve a PHP session variable in Java.

TIA
View profile  Send private message
Benjamin Krajmalnik
Posted: 03/08/2006, 7:05 PM

Well,

You are talking about essentially two separate state machines.
In order to retrieve a session variable from the PGP state machine you would
have to know what the session id for the particular sessio is on the php
side. Assuming you know this, you could either execute a php script from
within Java (if it is possible) to retrieve it using PHP calls, or, if both
systems reside on the same physical machine, then you could open the session
file for the specific sessio and parse it out directly.

No easy task either way IMHO.

wkempees


Posts: 1679
Posted: 03/09/2006, 5:27 AM

@B
Unless he's talking JavaScript and not Java? Am I right?
Meaning it can be done using JavaScript ?
Of course, why am I even asking, (flue probably) and to see If Garfieldus got his question right.
Another approach would be to not address the sessionVar but store it and the session identifyer (user login or so) in a database table, always overwriting the same line (on the PhP side)
The JAVA could then poll that table using the identifyer and pickup the value.

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
Garfieldus

Posts: 40
Posted: 03/09/2006, 6:41 AM

You're right Walter. I do mean javascript.
View profile  Send private message
peterr


Posts: 5971
Posted: 03/09/2006, 2:08 PM

Garfieldus

This is Java forum and it is not meant for submitting JavaScript questions. PHP or General forum may be a better one.
However, to answer your question, you can use a Label to output JavaScript from PHP. In the Before Show event assign to your label the JavaScript code string with the value of the session variable.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.