Re: problem in my php code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 18, 2004, at 10:46 AM, Hongwei Li wrote:

Hi,

I have a problem in my php code.  I simplify the code as the 4 pieces
below and hope somebody can help me to fix the problem.

[snip]

no values are displayed. Apparently, $obj is not passed to tsnext.php and
tsshow.php (the second time), but $ind is. What is wrong in the above
codes? Can somebody help me?


I greatly appreciate all help!

Hongwei Li

Like Richard said, your files don't know that the global variables exist in the other files. Someone correct me if I'm wrong on this, but globals are only global to that specific file. If you want to pass the data from one script to the next, I would use $_SESSION variables. If you do, make sure you include session_start() at the beginning of each script page.


Just in case you haven't used $_SESSION variables before:
http://us2.php.net/manual/en/function.session-start.php

~Philip

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux