Re: [PHP-DB] "global" variables

2004-03-02 Thread Torsten Lange
Yes agreed - but you cannot store them in a variable because they will be lost each time the page reloads. Why not store them in a cookie? Hello Davey, thank you for help! I now don't use a cookie but added a column for this purpose in my usertable in the db. Torsten -- PHP Database Mailing List

Re[2]: [PHP-DB] "global" variables

2004-03-01 Thread Richard Davey
Hello Torsten, Monday, March 1, 2004, 6:30:11 PM, you wrote: TL> You mean this will unset $v_dec["page_no"]? Well $page_no at that point in your script equals nothing, so yes - it will always make $v_dec equal nothing. TL> This explains why at reload of index.php happens what happend. TL> But h

Re: [PHP-DB] "global" variables

2004-03-01 Thread Torsten Lange
Hello Devey, > $v_dec["page_no"] = $page_no; > Which means that $v_dec will always equal nothing, because at the > point at which the file is included, $page_no hasn't been set to > anything at all. You mean this will unset $v_dec["page_no"]? This explains why at reload of index.php happens what h

Re: [PHP-DB] "global" variables

2004-03-01 Thread Torsten Lange
Richard Davey wrote: > You don't check $v_dec in your manage.php script though, you check to > see if $page_no is set which it never will be, because no-where do you > give it a value. Thanks Davey, but is $page_no not set every time (see below) or did you mean that I must rather use $v_dec["page

Re: [PHP-DB] "global" variables

2004-03-01 Thread Richard Davey
Hello Torsten, Monday, March 1, 2004, 4:48:39 PM, you wrote: TL> I build a small web interface to a database. This should be on the PHP General list, not DB - but even so, I'll answer your question: TL> if(!isset($page_no)) TL> { TL> $page_no = "login"; TL> } TL> I declared the $pa

[PHP-DB] "global" variables

2004-03-01 Thread Torsten Lange
Hi, I build a small web interface to a database. I include into the index.php the and a : #index.php In I include the and the and then decide on the status of a variable $page_no which further has to be included to perfom the query jobs: #manage.php if(!isset($page_no)) { $page_no =

RE: [PHP-DB] Global variables

2002-12-10 Thread Ford, Mike [LSS]
> -Original Message- > From: Jim [mailto:[EMAIL PROTECTED]] > Sent: 10 December 2002 18:51 > > Can I define a global variable in a function and then > successfully reference > it in the rest of the page? Yes. (Why didn't you just try it?) Cheers! Mike ---

[PHP-DB] Global variables

2002-12-10 Thread Jim
Can I define a global variable in a function and then successfully reference it in the rest of the page? I know that globals are usually defined in the page scope and referenced in a function by specifying them as globals, but it seems logical that a variable can be created and given a value in

Re: [PHP-DB] Global variables, $_GET problem

2002-07-24 Thread Ruth Zhai
]> To: "'Ruth Zhai'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, July 24, 2002 1:44 PM Subject: RE: [PHP-DB] Global variables, $_GET problem > Ruth, > > your reference to $_GET('var') is close, but as you have seen - no cigar :)

Re: [PHP-DB] Global variables, $_GET problem

2002-07-24 Thread Andrey Hristov
- Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 24, 2002 6:45 AM Subject: Re: [PHP-DB] Global variables, $_GET problem > On Wednesday 24 July 2002 11:38, Ruth Zhai wrote: > > > We just upg

Re: [PHP-DB] Global variables, $_GET problem

2002-07-23 Thread Jason Wong
On Wednesday 24 July 2002 11:38, Ruth Zhai wrote: > We just upgraded our PHP to version 4.2.1. I realized that $var is no > longer available from www.url.com/myphp.php?var=3 . As instructed in the > document, we have tried two things: Good, someone who reads the docs :) > 1. I tried to use $_

RE: [PHP-DB] Global variables, $_GET problem

2002-07-23 Thread Beau Lebens
02 11:39 AM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] Global variables, $_GET problem // // // Hello php friends, // We just upgraded our PHP to version 4.2.1. I realized that // $var is no // longer available from www.url.com/myphp.php?var=3 . As // instructed in the // document, we have tri

[PHP-DB] Global variables, $_GET problem

2002-07-23 Thread Ruth Zhai
Hello php friends, We just upgraded our PHP to version 4.2.1. I realized that $var is no longer available from www.url.com/myphp.php?var=3 . As instructed in the document, we have tried two things: 1. I tried to use $_GET('var'), however, I got "Fatal error: Call to undefined function: array() i