Jump to content

I would suggest against using htmlspecialcharacters on a User's password as it doesn't give you any benefit.

The reason why I have the $name in the field is because I'm using a PHP Magic method. So when I try to set the user's password using

$user->password = "NewPassword";
PHP will essentially rewrite it to

$user->__set("password", "NewPassword");
The benefit to doing it this way is I can change any field extremely easy.

$user->email = $newEmail;$user->name = $neeName;Etc
Those all work automatically without me needing to modify the class (as long as the name of the field I'm changing matche the name of the field in the database).

 

woah

That's object oriented right? I haven't got into that yet, and I see I should. Where can I find some resources to learn that? 

I'm still wrapping my head around this database nonsense, if I don't comment everything I'll probably spend half an our reading the code of a window I had closed 5 minutes before.

 

Also, I'm trying to do the admin/user stuff, what is the best way to do it? Like I've had this full copy of the website, that was the admin version, with a few more buttons and such, but I feel like that's not optimal storage wise , but I don't wanna be filling pages with ifs that go from top to bottom and then having to swallow the computer so I can understand what each closed bracket is ending.

(EDIT: Got it, gonna stuff a bunch of functions in some php page somewhere and include it, then use the functions inside there :) )

 

Also, won't escaping html prevent the little <script></script> from the form I don't remember the name of?

Edited by ¨TrisT¨
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×