Others ideas

You may be interested in the posts below.
Online by Stevenmedia

The WordPress blogging system has grown by leaps and bounds in just a few short years. Web developers familiar with JavaScript and PHP have flocked into the community. As such we have seen a tremendous surge in free code, plugins,...

Online by Stevenmedia

When you scroll to the bottom of an index page on a WordPress site, what do you see? Chances are it’s two links, one saying “Older Posts” and one saying “Newer Posts”. Scarcely has any default setting been more engagingly...

Online by Stevenmedia

WordPress is one of the most popular choices for bloggers, businesses and anyone who wants to have a hassle-free blogging software with loads of features and support. Being a popular CMS (Content Management System), it is the most targeted platform for hackers. Even though the...

Online by Stevenmedia

Whenever you install WordPress with its default configuration, the database prefix “wp_” will be used for all the tables in your WordPress database. Even though it doesn’t look like much, your site might be at risk with this default table...

Online by Stevenmedia

WordPress comes with a user role management system which defines what a specific user can and cannot do on your website. Knowing these user roles and permissions are essential as your WordPress site grows. In this beginner’s guide to WordPress...

Online by Stevenmedia

Adding this snippet to the functions.php of your wordpress theme will add support for uploading SVG inside WordPress Media Uploader. It is important to consider risk when uploading SVG as it is an XML file. Keep security in mind and...

Online by Stevenmedia

Displaying an exact date on your posts is great but why not change things up just a little and display “1 Hour Ago, 2 Hours Ago, 1 Day Ago, 2 Days Ago, 1 Week Ago, etc. Just add this snippet...

Online by Stevenmedia

Sometimes you will need to add a custom attribute to an image. This is very easy to do using the_post_thumbnail() function. The following snippet will add the custom attribute of 'itemprop="image" to your images but you can change that to...

Online by Stevenmedia

From the title, you probably have guessed what I am going to talk about. (more…)

Online by Stevenmedia

Semantic data…sounds dry, right? Well, it’s one of the most exciting things happening under-the-hood of more and more of the websites you visit on a daily basis. And it’s something almost anyone can add pretty easily to their web pages....

For many people, the main reason for learning a scripting language like PHP is because of the interaction with databases it can offer. In this tutorial I will show you how to use PHP and the MySQL database to store information on the web and include it into your website. Before you read this tutorial you should have at least a basic knowledge of how to use PHP.

It is actually surprising how useful a database can be when used with a website. There are a huge variety of things you can do when you interact the two, from displaying simple lists to running a complete website from a database. Some examples of PHP and MySQL being used together are:

  • Banner Rotation. On this site, where each banner is, a PHP script is called. This opens a database and picks a random banner from it to show the visitor. It also counts the number of times the banner has been viewed and could, with a few changes, track clicks too. To add, change or edit the banners all I have to do is change the database and the script will pick the correct banners for all the pages on the site.
  • Forums. Hundreds of forums (message boards) on the internet are run using PHP and MySQL. These are much more efficient than other systems that create a page for each message and offer a wide variety of options. All the pages in the forum can be updated by changing one script.
  • Databases. One quite obvious example is sites which get all there information from a database. For example Script Avenue is run by a few scripts, which gain all their information from a large database. All the different script categories can be accessed in one script by just changing the URL to access a different part of the database.
  • Websites. If you have a large website and you want to change the design it can take a very long time to update and upload all the pages. With PHP and MySQL your whole website could be just one or two PHP scripts. These would access a MySQL database to get the information for the pages. To update the website’s design you would just have to change one page.

You only really need three things to run PHP scripts which access MySQL databases. Firstly, you will, of course, need a webserver. This can either be on a computer of your own or on a web host. Any web server software should work with PHP and MySQL but the best to use is Apache, which is free.

PHP also needs to be installed on the server. If it is not already installed you can install it (or ask your web host to install it). It can be downloaded from PHP.net and is also free. If you are not sure if you have PHP installed I will show you a way to check it later.

Finally, you will also require MySQL. This is the actual database software. You can also use most other types of database (SQL, Oracle etc.) but as this is a PHP/MySQL tutorial I will deal just now with the MySQL database (although the commands used here will also work with SQL databases). As with the other software you need, MySQL is free and can be downloaded from the MySQL homepage. If you are not sure if you have MySQL installed, I will show you how to check later.

If you cannot install (or your web host won’t allow) PHP and MySQL you can still use another web host.

Wordpress - 4 years experience
MySQL - 5 years experience
PHP - 5 years experience
HTML - 7 years experience
CSS - 6 years experience

In a nutshell, the web is a whole bunch of interconnected computers talking to one another. The computers (on the web) are typically connected by phone lines, digital satellite signals, cables, and other types of data-transfer mechanisms. A ‘data-transfer mechanism’ is a nerd’s way of saying: a way to move information from point A to point B to point C and so on.

The computers that make up the web can be connected all the time (24/7), or they can be connected only periodically. The computers that are connected all the time are typically called a ‘server’. Servers are computers just like the one you’re using now to read this article, with one major difference, they have a special software installed called ‘server’ software.

Server software is created to ‘serve’ web pages and web sites. Basically, the server computer has a bunch of web sites loaded on it and it just waits for people (via web browsers) to request or ask for a particular page. When the browser requests a page the server sends it out.

The short answer is: by typing in the URL, or in other words, the web site address. So for example, if you wanted to find the web site www.steven-media.ro, you would type in the address into your web browser’s address bar or maybe use your ‘favorites’ or ‘bookmarks’ link to StevenMedia.

There are other ways to find web sites (like search engines,) but behind the scenes web sites are all being found by going to the web site’s official address. That brings us our last nerd detail: how does a website get an official address so that the rest of the web can find it?