$_COOKIE[''], $_GET[''], and $_POST['']

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

$_COOKIE[''], $_GET[''], and $_POST['']

Post by user___ »

Hi guys,
I am creating a class in which I check a cookie whether it has a value or not. When I start the script(in which the class is invoked) and the cookie is not set yet I get a Notice
Undefined index:...
. Does anyone can help. It is the same with $_GET and $_POST.
This is the part which checks the Cookie:

Code: Select all

if($_COOKIE['myCookie']) {
}
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

have a look at isset()
Post Reply