Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookies and Java related to PHP ***Please Help*** 1

Status
Not open for further replies.

chuckbridges

Programmer
Apr 15, 2005
19
US
Two questions from this Beginner
If I want to transfer a variable thats PHP to one thats JAVA
how do I do that?

1st question:
If I have one like var IP =
and I have an $IP in PHP but I want IP to be the $IP for JAVA ?
-----------------------------------

2nd question:
Any simple example on how to set a cookie
say called name to $user in PHP ?

Thanks...



 
Not enough information to give a meaningful answer.
Please give more information.
 
1st question revised:
If I want the variable java variable ip to be set to what the php variable $siteip is there a format to do that
in PHP?
-----------------------------------

2nd question revised:

Any simple example on how to set a cookie in PHP

Lets say I want the cookie called "Name" and I wish
its value to be set to the php Varaible $user

Thanks...
 
The first question I can't answer, since I don't know - is it a Java Servlet or a Java Applet on the client"

Question 2:
bool setcookie ( string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]] );
Code:
set_cookie('Name',$user);
This is as simplified as possible. I would include valid parameters for expire, the path, and domain.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top