Hey everyone,
I am currently learning PHP, and I have a small question to ask. I got to object orientated programming, I get the idea behind it, define the class and the functions inside the class, and you can decide if variables (fields) inside the class be public/private/protected - same applies for the functions.
My question is, can one create a seperate file, which will just contain the class(es) you will use, a seperate file for the form, and then another file for processing the form (here, you will somehow call the classes file you made).
Is this possible in PHP?
I thought a simple include "filename.php" (filename is the file which has the classes you may use). I tried this, but then it gave me an error saying my class does not exist.
I am currently learning PHP, and I have a small question to ask. I got to object orientated programming, I get the idea behind it, define the class and the functions inside the class, and you can decide if variables (fields) inside the class be public/private/protected - same applies for the functions.
My question is, can one create a seperate file, which will just contain the class(es) you will use, a seperate file for the form, and then another file for processing the form (here, you will somehow call the classes file you made).
Is this possible in PHP?
I thought a simple include "filename.php" (filename is the file which has the classes you may use). I tried this, but then it gave me an error saying my class does not exist.