Page 1 of 1

PHP isset() problem

Posted: Tue Jan 19, 2010 6:39 am
by hairytea
Hello,

Am hoping this is a simple question???

I have been having trouble executing functions based on the isset() function returning a value.

Long story short....

I have just called my host (123-reg) who explained that the isset() function is disabled and can not be used in my scripting.

I have always used this function elsewhere and never had the need to try anything else so am wanting to know....

Is there an alternative to the isset() function to check if my variables hold a value or not??

(I have tried empty() function also which is as well disdabled by 123-reg)

Any ideas?

Thank you in advance

Re: PHP isset() problem

Posted: Tue Jan 19, 2010 6:44 am
by hairytea
i'm going to try and use...

if ($_POST['VARIABLE'] == "") {
code to execute
}

is this a wise move??

Am more of a javascript developer (not a good one yet lol - but getting there) and would normally do this...

if (VAR == "" || VAR == null) {
code to execute
}

Does php support this also?

Should I include the check for 'null' if it does?

Re: PHP isset() problem

Posted: Tue Jan 19, 2010 8:39 am
by AbraCadaver
That is the most bizarre thing I've ever heard. I can't believe a host would disable these... If that is in fact the case, change hosts. These are core functions that are needed in almost every PHP application.

Re: PHP isset() problem

Posted: Tue Jan 19, 2010 8:44 am
by hairytea
funnily enough I have just changed from another host to this one as the previous host (one and one) do not support mysqli!

As I am fairly new to programming (using new books) I am being taught mysqli and not mysql, therefore I don't want to undo what i'm learning to start on something 'older' if you know what I mean.

I can ill afford to spend out on more hosting now.

Re: PHP isset() problem

Posted: Tue Jan 19, 2010 8:55 am
by AbraCadaver
You're not really going to learn PHP if you have to work around not having core functions that are essential to PHP. I would demand a refund.