Would it be good/secure?

Ask about a PHP problem here.
Post Reply
martijn1
Posts: 8
Joined: Mon May 16, 2011 6:48 pm

Would it be good/secure?

Post by martijn1 »

Hello

So soon I am going to create a big site, at this big site the admin will get the oppurunity to suspend users, close registrations etc. Would it be good to use integers for this, for example, if the admin opens registration the int would be 1, if closed it would 0. Is this a good and secure way to do these things?


Thanks in advance

Martijn1
Tino
Posts: 360
Joined: Thu May 05, 2011 8:55 pm
Location: The Netherlands

Re: Would it be good/secure?

Post by Tino »

I don't see a reason why that wouldn't work ;)

However, just for best practice purposes and maybe a slight increase in performance, make sure you use an INT with a max length of 1, rather than the standard 11. You'll probably only need 2 different states - open and closed - so there's no need for so much room.
Please check out my CodeCanyon items.
Post Reply