Tom Chubb wrote:
I have changed it a bit, and don't have the old code now!!!
I saw a post which identified a problem using isset when $var = ""; as
it returns true, so I changed my code to use...
if ($_GET['id'] != "")
{ $article="$id.php";
if (file_exists($article)) { include $article;
Tom Chubb wrote:
The purist method is what I wanted.
dev'ing with E_ALL is a good thing, but turn off E_NOTICE on productions
sites... IMHO
in fact make sure your production sites don't output any php errors at all
(even if they occur!),
sure log them, but don't show - it makes it just a litt
Tom Chubb wrote:
Thanks Jochem, useful info.
I've changed that now, but why is there still an Undefined index: id error?
its a notice technically not an error.
and its showing up because you have error reporting set to show notices.
to be really purist/correct do it something like this:
if (is
Thanks Jochem, useful info.
I've changed that now, but why is there still an Undefined index: id error?
Any ideas?
On 31/07/05, Jochem Maas <[EMAIL PROTECTED]> wrote:
> Tom Chubb wrote:
> > I have changed it a bit, and don't have the old code now!!!
> > I saw a post which identified a problem usi
Tom Chubb wrote:
I have changed it a bit, and don't have the old code now!!!
I saw a post which identified a problem using isset when $var = ""; as
it returns true, so I changed my code to use...
the fact that you are using $id suggests you have register_globals on
- not recommended practice.
I have changed it a bit, and don't have the old code now!!!
I saw a post which identified a problem using isset when $var = ""; as
it returns true, so I changed my code to use...
if ($_GET['id'] != "")
{ $article="$id.php";
if (file_exists($article)) { include $article; }
Tom Chubb wrote:
I am trying to create my own news system and to start with I'm using
static news pages until I get the db working properly.
I'm using the following code:
if(!isset($_GET['id']))
{ $article="$id.php"
if (file_exists($article)) { include $article; }
else { echo "The articl
7 matches
Mail list logo