PHP isset() problem

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
hairytea
Forum Commoner
Posts: 92
Joined: Mon Feb 04, 2008 8:31 am

PHP isset() problem

Post 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
hairytea
Forum Commoner
Posts: 92
Joined: Mon Feb 04, 2008 8:31 am

Re: PHP isset() problem

Post 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?
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: PHP isset() problem

Post 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.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
hairytea
Forum Commoner
Posts: 92
Joined: Mon Feb 04, 2008 8:31 am

Re: PHP isset() problem

Post 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.
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: PHP isset() problem

Post 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.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Post Reply