Hi everyone,
I have a table with 7 fields, and I have a search page, which has seven text fields and one submit button, and according to the criteria entry the result will be displayed on the same page, below the text fields.

I need this on many of my pages, Therefore if anyone could give me the class for this, that would be very good instead of using the code several times.


Hi Tanha, why do you think that using classes and objects will help you achieve what you want?
It's just a different programming method as compared to linear, or spaghetti :-) code.
If you insist on a class then simply take your code and wrap it as a class.

Also it sounds suspicious that you ask for a code for something that you already have.

I would say that the issue really is somewhere else. Either someone told you to use a class and you're not sure what that is - then a simple question in a discussion forum won't save you.
Or you want to reuse your code and you think that OOP is the only way.

I suggest that you place the code you want to reuse into a separate file and simply include it into every place where you need it:

include "myform.php";