Undefined Index - is this how you "declare" get & post?
From: Terence (terence_at_sunway.edu.my)
Date: 10/30/03
- Next message: Jon Kriek: "Re: Undefined Index - is this how you "declare" get & post?"
- Previous message: Pablo Luis Zorzoli: "Re: [PHP] Problems with remote include"
- Next in thread: Jon Kriek: "Re: Undefined Index - is this how you "declare" get & post?"
- Reply: Jon Kriek: "Re: Undefined Index - is this how you "declare" get & post?"
- Reply: John W. Holmes: "Re: [PHP] Undefined Index - is this how you "declare" get & post?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: <php-general@lists.php.net> Date: Thu, 30 Oct 2003 08:40:24 +0800
Hi List,
Since I started using error_reporting(E_ALL), I havent found (in my opinion)
a good way to declare GET and POST variables when getting them from a form
or querystring. I have searched google and the docs for several hours now
without much luck.
<?php
error_reporting(E_ALL);
// This line stops the error reporting, else I get - Notice: Undefined
index: i in.....
$HTTP_GET_VARS["i"]="";
if ($HTTP_GET_VARS["i"] == "") {
include("myfile.php");
}
?>
Is there a better way?
I have tried var $i (only for classes I've discovered)
settype($i, "integer")
Thanks in advance.
- Next message: Jon Kriek: "Re: Undefined Index - is this how you "declare" get & post?"
- Previous message: Pablo Luis Zorzoli: "Re: [PHP] Problems with remote include"
- Next in thread: Jon Kriek: "Re: Undefined Index - is this how you "declare" get & post?"
- Reply: Jon Kriek: "Re: Undefined Index - is this how you "declare" get & post?"
- Reply: John W. Holmes: "Re: [PHP] Undefined Index - is this how you "declare" get & post?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|