Access and Change PHP MySQL Fields Easier -
I have a PHP web application, where the user logs in, a bunch of different properties associated with them in the MySQL table it happens .
What I want to do, is something like this:
$ obj = mysql_fetch_object (Mysql_query ("select user from where userid = '$ id'"));
Then, if I want change or access properties, then I want to do something like this:
$ obj-> Password = "newpass";
ek $ obj- & gt; password;
However, now what do I have to do if I want to change the user's password then I have to:
mysql_query ("User User Safe Password = 'newpass' where user id = '$ id' ");
Is there an easy way to do this that takes less code?
Thanks for any help in advance.
I found - very simple and easy to use.
Comments
Post a Comment