Re: problem in my php code
| From: | Philip Thompson | Date: | Thu, 18 Nov 2004 18:52:19 +0000 |
| Subject: | Re: problem in my php code | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202456@lists.php.net to get a copy of this message | ||
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 LiLike 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