Re: [PHP] simple questions about sessions

2001-06-22 Thread Style|warrioR

greetings.

Your no [1] question describes exactly the problem I have...and
I thought session_is_registered() would do the job...(but I was wrong)
...
Now my solution looks like this:

session_register("session_uID");
if (isset($session_uID)) {
do something;
}
else {
session_destroy(); // destroy the "accidentely" generated session, which
means I have no session
}

not very nice - I knowbut the only way I found to solve the prob


[2]
if u have "enable-transit-id" enabled, PHP will add the &PHPSESSID=blah to
all your HREFs and forms (I think a hidden field is automatically added) - u
don't need to do anything in addition). if u
want to redirect via header command u have to do it like this:
header ("Location: aDocument.php?".SID);


[3]
that NEVER happened to me - so I have absolutely no idea


greetz,
andi





"kaab kaoutar" <[EMAIL PROTECTED]> schrieb in im Newsbeitrag:
[EMAIL PROTECTED]
>
> Hi!
>
> 1- is there a way with which i can verify that a session variable is
> registered or exists  without using start_session cause if it's not
> registered and there is no session it'll create the session !
> i tried isset() but if it's set i have to use start_session so as to get
the
> values and as we know start_session should be at the beginning!
>
> 2- if i create a session in a page can it be used in all the site pages
and
> rames without adding any $phpsessid to all urls?
> in my php.ini the enable-transit-id is enabled !
> byt the way what do u mean by compilin php? i just save the php.ini!
>
> 3-with IE and netscape as i add the phpsessid to urls , sometimes it
> remmbers an old session and displays it to me ! how can i avoid these?
> please help i'm confused!
>
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Simple Questions

2001-05-08 Thread Benjamin Munoz

This is not working?

echo("$server->server_num_players."/".$server->server_max_players
");

If you are trying to print out 
4/4
but can't because it is evaluating it mathematically, try using the HTML
character entity for /, /

echo("$server->server_num_players/$server->server_max_players");

Hope this is what you meant.

-Ben

-Original Message-
From: Ender [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 3:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Simple Questions


Okay few questions, I am pretty new to this hehe.

If I have a number say, 123.123.123.123.

$ip = 123.123.123.123;

How do I put a starting " and an ending " to make it

"123.123.123.123"

AND

This doesn't work:

echo("$server->server_num_players."/".$server->server_max_players
");

What do I need to do to put a / between the two variables?


Best regards,

Ender [Clan Leader]
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]