You can download the entire source code for this series here PHP Quiz (10.88 kB)

Now that we’ve thought of some questions/answers and created ‘questionsandanswers.php’, it’s time to create the basic html pages. The quiz consists of three pages, ‘index.php’, ‘test.php’ and ‘results.php’. The first two, ‘index’ and ‘test’ are very similar so we’ll start with those. Continue reading »

 

You can download the entire source code for this series here PHP Quiz (10.88 kB)

Part 1 can be seen here

To start building your own php-powered quiz the first thing you need, surprise surprise, is some questions and answers. We want easy access to these later on so we’ll create two arrays, one for the questions and one for the answers.

Continue reading »

 

The Web Acronym Test

OK, this is just a silly quiz. You probably won’t want to make your own quiz but who knows? It’s a fun little project to do and at the same time introduces you to some basic php that you might not have used before such as arrays, sessions, SimpleXml and more .

For this first post, I’m going to show you the example. In future posts, I’ll show you how to build your own.

Continue reading »

 

If you’re already using css to highlight the ‘current page’ in your navigation but then decide that you want to include your navigation using a PHP Include, a problem becomes apparent:

Continue reading »

 

If you want to give your visitors the option of viewing your site with several pre-defined styles that you’ve created, a simple bit of PHP is just what you’re after. Before you start, you’ll need to have some alternative stylesheets ready to go and a web host that supports PHP (hopefully, that bit goes without saying!) as your pages will need to end with the .php extension. Continue reading »

 

On many occasions when you’re buildingĀ  website, you’ll find that most, if not all, of your site pages share a common area. Typically, this might be a ‘header’ , a ‘footer’, a ‘sidebar’ or all 3.

A great way to reduce maintenance time for yourself is to use PHP includes (providing your server has PHP enabled of course!). Continue reading »

© 2012 ElanManSuffusion theme by Sayontan Sinha

Page optimized by WP Minify WordPress Plugin