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
Hi,
I build a small web interface to a database.
I include into the index.php the filepaths and a manage.php:
#index.php
?php
session_start();
$base_path = /.../;
include('manage.php');
?
In manage.php I include the variables.php and the functions.php
and then decide on the status of a variable
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 $page_no
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
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 happend.
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 how
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
-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
- 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 upgraded our PHP to version 4.2.1. I realized
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()
]
// 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 tried two things:
// 1. I tried to use
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
12 matches
Mail list logo