|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
sick of isset and !isset
I am sick of isset screwing me,......anyone else go through this before?
PHP Code:
PHP Code:
__________________
-- Jason |
|
#2
|
|||
|
|||
|
I really don't see the problem with this code:
Code:
if( ( !isset( $_COOKIE['uid'] ) ) && ( !isset( $_COOKIE['phash'] ) ) )
{
print "Both Not Set";
}
else
{
die( "Cookies Not Set, Please Login" );
}
Its prints "Both Not Set" when I run it. Take a look at some of your code before these lines and make absolute sure you are not setting either one of these variables. The best thing to do is what I did... Put this in a file by itself and run it.
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
|
#3
|
|||
|
|||
|
ok now try it this way,...
PHP Code:
see what I mean? |
|
#4
|
|||
|
|||
|
In order for this line to be true:
PHP Code:
Both $_COOKIE['uid'] and $_COOKIE['phash'] would have to have been set... this just is not the case, thus the statement returns false and the else part is executed. |
|
#5
|
|||
|
|||
|
I need to go back and change the code back to what is was before.,...so I can re-duplicate what had happened,.....thus getting my thoughts on this back on track,....
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > sick of isset and !isset |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|