I've produced a table in DB with title "member" getting area "title", "college", "email", "zid" now I've produced a category(in php) like

class member
 private $name,$college,$email,$zid;
 private function adduser
    //function definition
 public function autherise($id)
    //function definition

now at index page I'm taking these value as input from user using html form(validated by JS) now at action page of form I wish to create object as obj=participant() then calling the course work as obj->autherise($_publish['zid']) I would like the defintion of autherise and adduser function like autherise look into the originality of zid and also the calls adduser with remaining publish variables and store these to object then add whole object in a single query to DB.

I dont wan insert into member(name,email,college,zid) values('$name,$email,$college,$zid') I wish to enter obj straight to the db

You are able to modify anything in functions

Thanks ahead of time!!!

An "easy" means to fix store an entire object somewhere, as with a database, would be to serialize it -- i.e. change it to some string and, then, store that string in one area within the database.

You can do this, in PHP, while using [cde] function -- and also to p-serialize the string for an object, you will employ the [cde] function.

Another solution is always to serialize your resist the JSON format -- nice factor with that's that JSON could be prosecuted from Javascript, and from many different programming languages, while using right libraries.

For JSON, see [cde] and [cde]

Like a sidenote : observe that should you store your computer data as serialized strings, it will likely be harder to control them in SQL : you won't have the ability to update them utilizing a simple SQL query, for example and looking out is going to be hard too.

What this means is you'll also have to fetch your computer data in the database, manipulate all of them with PHP, and send it well towards the database -- that might not necessarily be such advisable, based on your requirements.

I am unsure what you are requesting. But maybe...just maybe you are searching for an object relational mapper (orm) , like e.g. doctrine.

Look at different companies ORM model , Study it at length ,you'll find the way to go

Should you be searching to keep an item inside a database you can serialize or unserialize the item right into a String after which store it inside a area within the table.

When you're available it again you are able to json_encode or json_decode the String again.