Re: [PHP] Re: session vars
U, is your top.php code being printed AT ALL? Because in the code you gave us, you're attempting to include topo.php. HTH, John On 3/21/06, João Cândido de Souza Neto [EMAIL PROTECTED] wrote: tedd wrote: Hi: I hate this. Ok guy, don't fight with me. hehehe Follow's all code of files. Yeah ! Where's rodape.php ? If we're going to spend our time looking at your code, shouldn't you spend the time to provide all of it? tedd I'm sorry for do that. I'm stressed today. Forgive me. Follow's the rodape.php code: table width=780 height=61 border=0 cellpadding=0 cellspacing=0 bgcolor=#FF align=center tr td height=61 bgcolor=#009EFF div align=center font color=#FF strong Buffet Online - www.buffetonline.com.br /strong br Copyright (c) 2006 - Todos os direitos reservados /font /div /td /tr /table -- --- João Cândido de Souza Neto Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: session vars
João Cândido de Souza Neto wrote: Hipeople. I've a system where i use session and all is working fine. But has something that don't work and i can't to find the cause. When a use the include function, the file included don't see the session vars. Anyone knows why it's happen? Thanks. I'll try to explain better my problem. After start the session and setting all of session variables. I have a file named top.php that has the follow code in: a href=? echo $_SESSION[root]; ?/about.php About system /a I've too a file named page.php that has the follow code in: ? session_start(); ? ... Some codes ... ? include(top.php); ? ... some codes ... By this way, the file top.php ought to see the $_SESSION[root] variable, but it isn't happening. Just to remember, my register_global is defined to off. Thanks for your tips. -- --- João Cândido de Souza Neto Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: session vars
Where and how is $_SESSION[root] being initialized? Try outputting it's value right after it is initialized and see if that works successfully. Then try and output it's value right before the include(top.php) statement and see if that works successfully. Finally, try and output it inside top.php and see if that works. Shaunak Kashyap Senior Web Developer WPT Enterprises, Inc. 5700 Wilshire Blvd., Suite 350 Los Angeles, CA 90036 Direct: 323.330.9870 Main: 323.330.9900 www.worldpokertour.com Confidentiality Notice: This e-mail transmission (and/or the attachments accompanying) it may contain confidential information belonging to the sender which is protected. The information is intended only for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on the contents of this information is prohibited. If you have received this transmission in error, please notify the sender by reply e-mail and destroy all copies of this transmission. -Original Message- From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 9:38 AM To: php-general@lists.php.net Subject: [PHP] Re: session vars João Cândido de Souza Neto wrote: Hipeople. I've a system where i use session and all is working fine. But has something that don't work and i can't to find the cause. When a use the include function, the file included don't see the session vars. Anyone knows why it's happen? Thanks. I'll try to explain better my problem. After start the session and setting all of session variables. I have a file named top.php that has the follow code in: a href=? echo $_SESSION[root]; ?/about.php About system /a I've too a file named page.php that has the follow code in: ? session_start(); ? ... Some codes ... ? include(top.php); ? ... some codes ... By this way, the file top.php ought to see the $_SESSION[root] variable, but it isn't happening. Just to remember, my register_global is defined to off. Thanks for your tips. -- --- João Cândido de Souza Neto Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: session vars
Shaunak Kashyap wrote: Where and how is $_SESSION[root] being initialized? Try outputting it's value right after it is initialized and see if that works successfully. Then try and output it's value right before the include(top.php) statement and see if that works successfully. Finally, try and output it inside top.php and see if that works. Shaunak Kashyap Senior Web Developer WPT Enterprises, Inc. 5700 Wilshire Blvd., Suite 350 Los Angeles, CA 90036 Direct: 323.330.9870 Main: 323.330.9900 www.worldpokertour.com Confidentiality Notice: This e-mail transmission (and/or the attachments accompanying) it may contain confidential information belonging to the sender which is protected. The information is intended only for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on the contents of this information is prohibited. If you have received this transmission in error, please notify the sender by reply e-mail and destroy all copies of this transmission. -Original Message- From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 9:38 AM To: php-general@lists.php.net Subject: [PHP] Re: session vars João Cândido de Souza Neto wrote: Hipeople. I've a system where i use session and all is working fine. But has something that don't work and i can't to find the cause. When a use the include function, the file included don't see the session vars. Anyone knows why it's happen? Thanks. I'll try to explain better my problem. After start the session and setting all of session variables. I have a file named top.php that has the follow code in: a href=? echo $_SESSION[root]; ?/about.php About system /a I've too a file named page.php that has the follow code in: ? session_start(); ? ... Some codes ... ? include(top.php); ? ... some codes ... By this way, the file top.php ought to see the $_SESSION[root] variable, but it isn't happening. Just to remember, my register_global is defined to off. Thanks for your tips. -- --- João Cândido de Souza Neto Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I tried it yet, if a put a echo $_SESSION[root] before or after the include, it works fine, it doesn't work in the file top.php. -- --- João Cândido de Souza Neto Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session vars
João Cândido de Souza Neto wrote: I tried it yet, if a put a echo $_SESSION[root] before or after the include, it works fine, it doesn't work in the file top.php. Show us the code. What you're describing should not be possible. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session vars
Chris Shiflett wrote: João Cândido de Souza Neto wrote: I tried it yet, if a put a echo $_SESSION[root] before or after the include, it works fine, it doesn't work in the file top.php. Show us the code. What you're describing should not be possible. Chris Here's the original message: After start the session and setting all of session variables. I have a file named top.php that has the follow code in: a href=? echo $_SESSION[root]; ?/about.php About system /a I've too a file named page.php that has the follow code in: ? session_start(); ? ... Some codes ... ? include(top.php); ? ... some codes ... By this way, the file top.php ought to see the $_SESSION[root] variable, but it isn't happening. Just to remember, my register_global is defined to off. -- --- João Cândido de Souza Neto Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session vars
João Cândido de Souza Neto wrote: Show us the code. ... Some codes ... That doesn't count. :-) You're describing a situation that I seriously doubt is reflected in your code. Reduce the problem to the simplest example you possibly can, and then show us the code. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session vars
Chris Shiflett wrote: João Cândido de Souza Neto wrote: Show us the code. ... Some codes ... That doesn't count. :-) You're describing a situation that I seriously doubt is reflected in your code. Reduce the problem to the simplest example you possibly can, and then show us the code. Chris This code's exactly the one that produce the error. That is, in the line: a href=? echo $_SESSION[root]; ?/about.php ought to write a href=http://localhost/buffets/about.php; Did you understand? -- --- João Cândido de Souza Neto Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: session vars
-Original Message- From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 11:26 AM To: php-general@lists.php.net Subject: Re: [PHP] Re: session vars This code's exactly the one that produce the error. That is, in the line: a href=? echo $_SESSION[root]; ?/about.php ought to write a href=http://localhost/buffets/about.php; Did you understand? -- --- João Cândido de Souza Neto Web Developer Can you please provide the simplest example starting from where $_SESSION[root] is initialized to where it is first unsuccessfully used, in the following format: top.php: (insert example code here) page.php: (insert example code here) ... and any other relevant files ... Shaunak Kashyap Senior Web Developer WPT Enterprises, Inc. 5700 Wilshire Blvd., Suite 350 Los Angeles, CA 90036 Direct: 323.330.9870 Main: 323.330.9900 www.worldpokertour.com Confidentiality Notice: This e-mail transmission (and/or the attachments accompanying) it may contain confidential information belonging to the sender which is protected. The information is intended only for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on the contents of this information is prohibited. If you have received this transmission in error, please notify the sender by reply e-mail and destroy all copies of this transmission. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: session vars
Shaunak Kashyap wrote: -Original Message- From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 11:26 AM To: php-general@lists.php.net Subject: Re: [PHP] Re: session vars This code's exactly the one that produce the error. That is, in the line: a href=? echo $_SESSION[root]; ?/about.php ought to write a href=http://localhost/buffets/about.php; Did you understand? -- --- João Cândido de Souza Neto Web Developer Can you please provide the simplest example starting from where $_SESSION[root] is initialized to where it is first unsuccessfully used, in the following format: top.php: (insert example code here) page.php: (insert example code here) ... and any other relevant files ... Shaunak Kashyap Senior Web Developer WPT Enterprises, Inc. 5700 Wilshire Blvd., Suite 350 Los Angeles, CA 90036 Direct: 323.330.9870 Main: 323.330.9900 www.worldpokertour.com Confidentiality Notice: This e-mail transmission (and/or the attachments accompanying) it may contain confidential information belonging to the sender which is protected. The information is intended only for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on the contents of this information is prohibited. If you have received this transmission in error, please notify the sender by reply e-mail and destroy all copies of this transmission. Ok guy, don't fight with me. hehehe Follow's all code of files. In the file /index.php the session is started, the root session variable is registered and defined, in the In the file sca/index.php the file top.php if included and in the file top.php the variable $_SESSION[root] hasn't value. Thanks for your help. File top.php: div align=center center table width=780 border=0 cellpadding=0 cellspacing=0 bgcolor=#FF tr td colspan=2 img src=img/topo.jpg width=780 height=117 /td /tr tr td width=353 height=24 background=img/bg_menu.jpg style=PADDING-LEFT:10px table height=24 border=0 cellpadding=0 cellspacing=0 tr td style=PADDING-TOP:5px;PADDING-BOTTOM:4px ? function retorna_data ( ) { $agora = time(); $data = getdate($agora); if($data[wday]==0) { echo Domingo, ; } elseif($data[wday]==1) { echo Segunda-feira, ; } elseif($data[wday]==2) { echo Terça-feira, ; } elseif($data[wday]==3) { echo Quarta-feira, ; } elseif($data[wday]==4) { echo Quinta-feira, ; } elseif($data[wday]==5) { echo Sexta-feira, ; } elseif($data[wday]==6) { echo Sábado, ; } if($data[mon]==1) { $mes=Janeiro; } elseif($data[mon]==2) { $mes=Fevereiro; } elseif($data[mon]==3) { $mes=Março; } elseif($data[mon]==4) { $mes=Abril; } elseif($data[mon]==5) { $mes=Maio; } elseif($data[mon]==6) { $mes=Junho; } elseif($data[mon]==7) { $mes=Julho; } elseif
RE: [PHP] Re: session vars
Hi: I hate this. Ok guy, don't fight with me. hehehe Follow's all code of files. Yeah ! Where's rodape.php ? If we're going to spend our time looking at your code, shouldn't you spend the time to provide all of it? tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session vars
João Cândido de Souza Neto wrote: Chris Shiflett wrote: João Cândido de Souza Neto wrote: Show us the code. ... Some codes ... That doesn't count. :-) You're describing a situation that I seriously doubt is reflected in your code. Reduce the problem to the simplest example you possibly can, and then show us the code. Chris This code's exactly the one that produce the error. That is, in the line: a href=? echo $_SESSION[root]; ?/about.php ought to write a href=http://localhost/buffets/about.php; Did you understand? Chris would understand if the question and related material were provided better. -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session vars not echoing?
need to issue a session_start() at top of page Pete Jas wrote: Not sure why this is happening but I think it has something to do with an include statement... [Server environment] Apache/2.0.47 (Unix) DAV/2 PHP/4.3.3 register_globalsOnOn report_memleaksOnOn safe_modeOffOff safe_mode_exec_dirno valueno value Session Support enabled [Script registering vars - sessions.php] /* Format Date Time */ $hour = (date(H:i:s)); $day = (date(d)); $date = (date(F $day, Y)); /* Register vars */ $_SESSION['date'] = $date; [Main script - index.php] session_start() require 'scripts/sessions.php'; echo $_SESSION['date']; //This is not showing up in browser? Any help is appreciated... Jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session vars not echoing?
Yeah I did that, sorry I just didn't note it in the snippit.. and it is now working with the $_SESSION function, i just had to restart the browser to clear the cache after updating the code. jas Pete M wrote: need to issue a session_start() at top of page Pete Jas wrote: Not sure why this is happening but I think it has something to do with an include statement... [Server environment] Apache/2.0.47 (Unix) DAV/2 PHP/4.3.3 register_globalsOnOn report_memleaksOnOn safe_modeOffOff safe_mode_exec_dirno valueno value Session Support enabled [Script registering vars - sessions.php] /* Format Date Time */ $hour = (date(H:i:s)); $day = (date(d)); $date = (date(F $day, Y)); /* Register vars */ $_SESSION['date'] = $date; [Main script - index.php] session_start() require 'scripts/sessions.php'; echo $_SESSION['date']; //This is not showing up in browser? Any help is appreciated... Jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session vars vs. POST/GET vars?
Nevermind, just found the $HTTP_SESSION_VARS array... Thanks anyways! Take care, --Noel Noel Wade [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, So I have a session variable; but with register_globals active on the server I'm hosted at (no way to turn it off), just checkng for $varX in my script could retrieve the session variable, a GET variable with the same name, or a POST variable with the same name - and as a security concern, someone could use a GET request (http://somehost/mypage.php?varX=0) to spoof the script into thinking that varX is the wrong value. So, is there any way in a script to specify that I want to retrieve the value stored in the registered session_variable(varX)?? Thanks, --Noel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Session vars vs. POST/GET vars?
On Saturday 11 January 2003 18:39, Noel Wade wrote: Nevermind, just found the $HTTP_SESSION_VARS array... If you're using a relatively recent version of PHP, you should use $_SESSION. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Sic transit gloria mundi. [So passes away the glory of this world.] -- Thomas `a Kempis */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php