i am beginner on php so now i try to learn object oriented i was goggling i got it some ideas but not clear concept.So i come there.Please any php guru give simple example of how to crate classes and how to call on other php page.
for example
i want two classes one is show name
and second one is enter name
.First class show name this name come from database and second class put name in database.
Index.php
<form action="checking.php" method="post">
<input type="text" placeholder="Please enter name">
</form>
You have to create a class person and two methods..
The way you are calling a php page is good. That is from HTML.
What I think, you are getting this wrong. A class
showName
to get name from database andenterName
to save in database. Well what I suggest that should be a function within one single class.In
checking.php
you can include:This way you can achieve this, this is just an overview. It is much more than that.