Tag: acquiring

As my first simple PHP project, I’ve created a simple project that allows you to just enter your name and two numbers, where it displays them on the page and stores them in a database. It consists of 3 files: index.php, db.php & process.php. I wonder whether I have created the code efficiently.

I’m curious about all the talk behind procedural PHP vs PDO. I initially used some deprecated PHP5 functions and was corrected by the stack overflow community, but this has left me confused as to what specifically I should learn with PHP as a beginner. It sounds like procedural and PDO are very different, and that I should only pick one and learn that.

So my questions are as follows:

Is the coding in my project acceptable?

Is it similar to how most PHP projects are built? (i.e. are most procedural or PDO)

What should I learn as a beginner? (procedural or PDO?)

Do you have any beginner advice?

Any advice here would be very much appreciated as I’m new to PHP. Thanks for any help here. The files and code (excluding HTML & CSS) are below: