I created a table in the database with the name "member" from the "name", "college", "email", "zid" fields, now I created a class (in php), for example
class member { private $name,$college,$email,$zid; private function adduser {
now on the index page. I take this value as input from the user using the html form (verified by JS), now on the form's action page. I want to create an object as obj = new member (); then calling the class function as obj-> autherise ($ _ post ['zid']); I want the autherise and adduser functions, like autherise, to check the uniqueness of the zid and adduser calls with the rest of the post variables and save them for the object, and then add the whole object to a single DB query.
I don't want insert into member(name,email,college,zid) values('$name,$email,$college,$zid') I want to enter obj directly in db
You can change anything in the functions.
Thanks in advance!
source share