Hopefully by now, you’ve got your head around getting a PHP script to run by uploading it to a server and accessing its results through a web browser. If you stuck around for Part 2 in this series, you might even have dabbled with a Form or two. POSTing to a Form is one way of taking in information, doing something with it, and showing a result to the user. To take this much further, PHP can integrate very well with a database - this allows you, the PHP programmer, to display all kinds of data in limitless different ways to your website visitor. In this installment (Part 3), we’re going to take a look at hooking up a PHP script to a MySQL database.
In the first part of this tutorial, we looked at how PHP can be used to display dynamic data, like todays date. You’ve also by now hopefully figured out the process of making a .php file, uploading it to your web host, and running it. With that much done, its time to try something a little more adventurous!
Have you ever gone to a website and after you have logged in, it shows you your sign up name, right there on the screen? Or it shows today’s date, or today’s cinema listings? These are all examples of “dynamic” elements on a website - they are generated and presented to you when you visit the website. With PHP, you can do all this and much, much more - and we’ll show you how!
Recent Comments