Others ideas

You may be interested in the posts below.
Online by J&S Code

Hooks are very useful in WordPress. They allow you to “hook” a custom function to an existing function, which allows you to modify WordPress’ functionality without editing core files. In this article, we have compiled 10 extremely useful ready-to-use WordPress...

Online by J&S Code

Are you finding issues in managing the image quality for your WordPress powered website/blog? If your answer is a “Yes” then this is a post just for you. Here, I’ve jotted down a list of few important pointers which allow...

Online by J&S Code

Do you want to capture more data when creating a post or a page? Do you want to add some custom fields to your custom post type? With WordPress’s metabox functionality, you can! There are a few moving parts here,...

Online by J&S Code

We know that WordPress developers struggle to create meta boxes with custom fields. We know the Codex does not have enough information. We also know that advanced developers don’t like to use plugins with tons of unnecessary code, just to...

Online by J&S Code

WP_Query is an exceptionally powerful tool in WordPress. Every WordPress site contains a database that stores many posts (of many post types) that make up the bulk of that site’s content, and WP_Query is the best way to fetch or...

Online by J&S Code

“pre_get_posts” is a WordPress hook that allows you to modify the current query. Just a quick reminder: when you’re visiting any page of a WordPress install, the system creates a query that depends on the url you’re visiting. This is...

Online by J&S Code

The WordPress search function is much maligned and there are numerous plugins available to add enhancements but they don’t always provide what you want, especially if you are trying to build a secondary search engine that has specific requirements. (more…)

Online by J&S Code

Organizing your content is one of the core features of a content-management system like WordPress. As such, it creates what are called “taxonomies” to help you keep your content easy to find for both your and your visitors. Today we’re...

Online by J&S Code

What seems like one of the most complicated bits of functionality in WordPress is adding meta boxes to the post editing screen. This complexity only grows as more and more tutorials are written on the process with weird loops and...

Online by J&S Code

One of the reasons WordPress powers 27% of the Internet is that it’s an incredibly flexible content management system. We all know about the standard Pages and Blog Posts that you can create easily with WordPress, but what about when...

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?