Jump to content

only way ican Undefined index: is isset?


Gayner

Recommended Posts

bcz if i put that, that stupid ass unidefined index error will pop up.

 

 

all i want to know is how the helld o i make this shorter? why do i have to all this .... stupid isset is a stupid function burn in hell!

 

if(isset($_COOKIE['skinid']) && $_COOKIE['skinid'] == 'default')
{
echo '<style type="text/css" media="all">@import url(1.css);</style>';
}
if(isset($_COOKIE['skinid']) && $_COOKIE['skinid'] == 1)
{
    echo '<style type="text/css" media="all">@import url(2.css);</style>';
}
if(!isset($_COOKIE['skinid']))
{
    echo '<style type="text/css" media="all">@import url(2.css);</style>';
}

 

why do i have to use this only way it works w/o unidenified index errors.

isset returns a boolean, if you want to check the data in a cookie do this:

 

if(isset($_COOKIE['skinid']) && $_COOKIE['skinid'] == "heelo")

 

Will work, as it first checks if the cookie isset if it is then it tests the data in that cookie.

isset returns a boolean, if you want to check the data in a cookie do this:

 

if(isset($_COOKIE['skinid']) && $_COOKIE['skinid'] == "heelo")

 

Will work, as it first checks if the cookie isset if it is then it tests the data in that cookie.

 

why the hell . i dont want to use isset.. while i code my website i aint putting isset around all ym stuff that's ridicilous is there another way so that IT DOESNT POP UP UNIDENTIFIED INDEX ERRORS PLZ

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.