PHP is nice. What else to do with it?

djoye

2[H]4U
Joined
Aug 31, 2004
Messages
3,113
I decided to learn some PHP and discover more of the features that my web host provides (nice of the to have myPHPAdmin installed).

I run a fairly simple web page with a growing table of information. I decided to check out PHP and realized that I could import all of the tabled information into a database and then let PHP spit it out when the page loads. Now I can simply update information by updating a database instead of modifying an HTML file and re-uploading it every time.

This is the page: http://satsun.org/audio/

The 'last updated' part at the top is also a PHP script that finds the latest date (max(date)) from the database and updates whenever I add or change information in the table (people would ask if I was still updating the page). I'll eventually figure out how to make the top row clickable so it can be sorted differently; I see that jQuery can apparently do that but I'm betting I can do that just the same with PHP.

On the main page, instead of using something like WordPress I decided I'd have a go at making my own news posting script; I have a good enough grasp of SQL and databases that I can imagine what all of that stuff looks like behind the scenes so I'm having fun trying to reproduce that stuff. I'll of course have to limit the number of entries shown on the first page (SQL: LIMIT X) so I have to figure out how to implement clickable links to show the next X number of entries; shouldn't be a problem.

From my understanding, PHP doesn't have just a ton of uses other than this. I'm loving its ability to essentially let me update information on web pages without having to deal with modifying and uploading HTML files. What else am I missing out on? How should I stay updated regarding security issues?
 
Since you're making your own CMS and interested in security I'd start by learning about parameterized queries (if you haven't already) and make use of them on your site.
 
Since you're making your own CMS and interested in security I'd start by learning about parameterized queries (if you haven't already) and make use of them on your site.
Thanks. I'll research that.
 
I write PHP applications daily and very rarely write basic PHP files like you have probably done. The possibilities are endless with the language, but there are many scenarios where other languages are more appropriate for the job.

Would highly recommend reading into frameworks to help take care of the project structure, security and repeat code.

Might be a bit of a jump from what you have built currently, but sometimes throwing yourself in at the deep end is the best way to learn.

My personal recommendations would be Symfony2 (http://symfony.com/) and Laravel (http://laravel.com/).
 
You probably will have better luck searching stored procedures for mysql, and using them with PHP / PDO is rather quick and simple.

PDO supports parameterized queries as well. If he ends up doing non-parameterized queries with stored procedures he'd still have the same security issues.


I write PHP applications daily and very rarely write basic PHP files like you have probably done. The possibilities are endless with the language, but there are many scenarios where other languages are more appropriate for the job.

Would highly recommend reading into frameworks to help take care of the project structure, security and repeat code.

Might be a bit of a jump from what you have built currently, but sometimes throwing yourself in at the deep end is the best way to learn.

My personal recommendations would be Symfony2 (http://symfony.com/) and Laravel (http://laravel.com/).

I've heard really really good things about those frameworks, as well as Composer which Laravel uses.
 
I've heard really really good things about those frameworks, as well as Composer which Laravel uses.

Symfony2 uses Composer too, in fact I think most PHP libraries use it these days as it seems to be the go to package manager :)
 
Back
Top