Category Archives: Blogging

Using PHP to Handle HTML Forms

Right probably the moment most of you have been waiting for, getting input from users! fear not. This is not hard, in fact it is not as hard as i first imagined. Now i have said in the introductory pages that i am assuming some basic knowledge of HTML. So this would cover setting up forms etc.

If your not so confident with HTML then fear not its pretty straight forward and plus you could probably get something like Dreamweaver to do it all visually if you need to.

Right I hope you all know what a form is (if not, they are the text boxes etc that you fill in when you order something online etc)

OK enough babble, an example… Enter the following code into a new notepad file and save it as “form.php”.

The Form.


<form name="form1" method="GET" action="">

Email: <input type="text" name="email">

<input type="submit" value="Submit">


OK I will just explain a little more about the form, we have declared the form at the top using the <form> element, we have also set some attributes of the form, as in the way in which it will send data “method=GET” this means that we will send data via appending it to the URL or web address using querystrings – PHP automatically creates the $_GET array for you. This means any element on your form, once it is submitted will be available in the $_GET array. The same is true if you decide to send the form via POST. You will have a $_POST array to handle. The example below will clear this up.

Notice how we have not set the action element, we have just left it blank. This means that we will simply be sending the data to the same page it came from, whats called a postback. This means that we can put all our PHP code on the same page as the form. Not the most useful example, but i will expand it when we come to look at databases etc.

So all we are going to do is take the value entered into the form and make them into an email(mailto) link. So on the same page, lets tap in the following code:


if(isset($_GET['email'])) {

print ("Please send your email to <a href=\"mailto:$_GET['email']\">" . $_GET['$email'] . "</a><br>");



Ok what we have done is used a built in function of PHP to check if anything has been entered into the form of not. We use inset to set if the $email variable has been declared(created really) and if it has we print out some HTML with a link to the email address entered into the form and the actual contents of the form printed out.

Your end result should look something like this:

Notice how the actual email address is attached to the end of the URL in the address bar that is the query string. Because we have written the HTML output as a link when we click on the link it will initialize your email client as it should ready for an email to be sent to the specified address.

Examples of a php code with health content about turmeric

There are some plants that people use not only for cooking but also for other health benefits. One of the many is turmeric. Turmeric is known to be the “Queen” of all the spices. It gives life to the taste of many dishes especially those originating from India.

If you are interested in eating curry, then you must also be interested in the health benefits that turmeric brings. If you live in Germany you can read an indepth article about curcumin here:

The first benefit that it has is it helps in healing wounds. According to studies, turmeric is an effective disinfectant, especially for wounds. Moreover, it is known to be a natural antiseptic and antibacterial agent. So, if you have a wound, you do not need to go for the commercialized antibacterial and disinfectants sold in the market. As long as you have turmeric, you can save money and you can be free of infection. Just spread the turmeric powder directly on your cuts or burns and soon you will feel that the inflammation process has started and soon your wounds will be healed.

To a girl, good health means good genetics

Another important benefit of turmeric is the fact that it helps in lowering the cholesterol level in the blood. When there is too much intake of fatty foods, fast and junk food, and too many sweets, the excess sugar or starch is converted into fat. Excess fat is then deposited in the arteries and the cholesterol level in the blood increases. If this is the case, there is a high risk of cardiovascular diseases which can soon lead to death. By simply adding turmeric in your daily intake of food, you will be surprised by the results that cholesterol levels in the blood are low.

Moreover, turmeric also helps in controlling diabetes. Diabetes is a lifestyle disease so many people have. With the use of turmeric, it will help in moderating the insulin levels in the blood. Moreover, it will also help those people using diabetes medications to increase their effects.
Lastly, studies have shown that turmeric helps in preventing cancer. Cancer is a disease that has no known cure up until this moment. This disease spreads really fast. A lot of people are battling with cancer but since there is no known cure, then probably many have lost their battles. By having turmeric in meals, it will help in killing off cancer cells.

Moreover, it will also help in preventing its growth and spread. Basically, the person will soon be cancer free for life.

Get more dates with girls if you show your genes are great and healthy

In summary, people should try to check out herbs and other medicinal plants that are not only good for cooking but also have a lot of health benefits. One of the most effective spices is turmeric because it is known to heal wounds, lower down blood cholesterol levels, prevent cancer, and it helps in moderating lifestyle diabetes. Turmeric is indeed the “Queen” because it can be used for different purposes such as healing and as an agent to make people enjoy good food.

Making a PHP File

Right let’s have a crack at some php then, all you need to make a php file is Notepad or any text editor for that matter.

So, let us open up notepad… as I make up code etc it will be added to the live version of this site. So if you are visiting when I have got good at PHP then it will please you to know that this site was once a bunch of html pages.

Enough of this gay banter, let us get started…

The first characters you should include in your php file is a <? opening tag and an ?> closing tag. So any code between these markers will be executed as php code. as long as your file extension is .php

Creating a dating site

There are number of reasons why a dating site would need the functionality of PHP. A lot of websites are built strictly using CMS systems now but they are very limited in what they can do. Let’s talk about a few of the reasons to use a PHP developer to make it more marketable, and to also make the site more user friendly and functional since these are the main issues with dating website platforms.

When thinking about marketing a monetized website a lot of people think about running ads but this isn’t the only way, or usually not even the best way. The best way to market a site is usually either through affiliates or search engine optimization. If you take for example a site that is doing well within CupidMedia, the main reason for their success is affiliate programs. They only have to pay a small fee for every paying customers. Someone with a VietnamCupid dating site can drive traffic to the site in exchange for a commission. This will really increase sales because everyone wins and you develop a big team that’s helping you market your site.

Another great option for marketing your site is search engine optimization. What we mean by this is to get your dating site to show up at the top of Google. This can be tricky and we won’t pretend to know the ins and outs of it. However, we do know that speed and easy to read code is a large factor in where the site shows up in the search rankings.

So where does PHP come in to the equation? PHP will make your life much simpler with each of these tasks. Your databases need to be fast and reliable if you’re running an affiliate program. It will keep everything organized and fast based and much easier to call sections of code to determine which affiliate should get credit for a sale. If you’re not developing this is PHP you can run into a lot of different problems which could cause people to not work with you. If these guys end up not working with you then your entire dating site could tank.

The second part of the reason for PHP is speed and efficiency. By running your site in this dream language you can convince search engines that you’re the most important site to be displayed for terms related to your dating site. This will lead to a HUGE increase in traffic to your site and in turn, more money for you. PHP allows for speed and efficiency with coding and shows search engines that you’re serious about your task. If it’s coded in Javascript then a lot of the action will be server side and slow down you site, including your band-width. Instead, you should have this coded in PHP or do it yourself by learning from our site. PHP will actually reduce load speed if it’s done correctly and lower your band-width because it can do it independently of the server.

The last part of this that’s important is storing members’ login credentials, collecting payment, and displaying lots of pictures efficiently. Try to do this is JavaScript and your head will be spinning and that goes without mentioning the load speed. Sure there’s good reason to use Java to call actions but that’s all it should be used for if you want the efficiency and power you need to handle a large dating site.

If there are any questions that go into depth on this subject then shoot us over a message. Be sure to remember that this is for beginners so we’re just explaining things in laymen terms for you to get a better grasp on how and why PHP is the best language for certain tasks.

Tips for Creating A Health Web Site

Creating a website that works well is an important factor because it determines whether the website helps to grow your business or not. A website that breaks information in shorter sections, gives clear instructions, minimizes the use of jargons, and uses single mouse clicks can be effective. Ensure that enough space is allowed between clickable targets.

A good website should make use of font 12 and 14 that are easy to enlarging the texts. Use high contrast colors such as white and black. Ensure that it provides the speech function and the text versions for multimedia.

A website that makes use of appropriate typeface, writing style, navigation structure and accessibility features can easily be accessed and used by the older adults. In addition, it will look attractive to the younger users. An example would be this paleo website.

A good website should be user friendly -meaning that it should be organized in such a way that users can easily determine the information the site offers at a glance.  Users should be able to figure out the kind of information the link will lead them to. It should also direct the user where he can get the additional information he may be looking for and be able to return to the previously visited page with ease.

healthy webdesign

A health website is one whose structure is simple and straight forward.  If the site is simple and less complex, visitors will enjoy using it and will visit it again. If the information is broken down into smaller sections, it gives the visitors a specific amount of content at a time.  This makes it easier for them to grasp the information.

Ensure that related information is grouped together and the most important information located where visitors can easily find it.  This means that the website should have all the sections organized in a logical manner.  Think about how the adults will find the relevant information they may be looking for.  Provide a site map that shows the links to the site. If possible limit the number of points you make on a single page.

If there is any information you consider key, it should be put on the first page. This ensures that the visitors see and form an opinion on what the website provides. Other than having the most important information at the top, it is necessary that you keep paragraphs short. They should talk about one idea.

Ensure that your content is written in an active voice i.e. it should focus on people and actions. Also you should remember to have the content written in a positive and a friendly manner.  The content should have a detailed explanation and should not leave people guessing.

The web content should be written in the second person.  Make use of ‘’you ‘’, ‘’your’’ and ‘’we’’ Besides, you must remember that people who search for information on the website are very busy. They may not have all the time to go through the entire content.  Because of this, it is important that you provide a summary of the information to reinforce what is contained in the body.

If any of the information has to be repeated, ensure that it consistent.  If there is any contradiction, explain the reason for it.

Lastly, a good and a health website should have sufficient white space on the web page to ensure that it looks good. Put a space between the paragraphs.  Similarly, if there are clickable targets, ensure that you allow enough space between them to make it easy to hit the link. Make use of the commonly used fonts such as Ariel, Tahoma and Verdana.

Getting Started with PHP part 4

** Please check the documentation on the php website if you are having problems with installation. Or email me and i’ll be glad to help out.

To open up IIS and see what I’ve been banging on about you will need to go to Control Panel – Administrative Tools – Internet Information Services(IIS).

** I recommend making a short cut to this on your desktop.
OK when you first open IIS it should look something like this(Once you have expanded all the branches to the Default Website Level)

Internet Information Services - Default View

The to create a virtual directory, Right Click on the Default Web Site and go to ‘new’ – ‘Virtual Directory’.

Internet Information Services - Virtual Directory

Once to this stage we’ll move on to a new page.

Getting Started with PHP part 3

Now we’re ready to start putting some of this stuff to use!

OK now we have installed IIS (the server) and the PHP script engine to help IIS to run our PHP files. We need somewhere to put them. This is where IIS comes in. We need to create a virtual directory, if like me your inital thought was whats all that mean then? I’ll try and explain

Right well the easiest way to tell you about these is by example. Us Brits see virtual directories everytime we watch the BBC. They are always advertising their website e.g. or Now the bit on the end is the virtual directory, the /sport or /nature the is the domain name of the BBC. When we type in the browser will check with IIS and IIS will do 1 of 3 things:

redirect you to another URL (website)
redirect you to another directory somewhere on a network
redirect you to a directory on your local computer
So, what does this mean…?
It means that when you type in IIS looks at where that location points to (out of the above list) and takes the appropriate action, so if you have a directory or folder full of HTML files and you point IIS to look at that folder, when someone enters the name of your virtual directory IIS will go to that directory on your computer and pull out the file named either “index.htm” or “default.htm” or which ever file you specify.

So an example to make this a little clearer, you have a folder c:\yourvirtaldirectory and a virtual directory called /yourvirtualdirectory. in that local folder you have an index.htm page. When you type in http://localhost/yourvirtualdirectory (providing it has been set up correctly which we will do next), IIS should pull out your default document

e.g. http://yourcomputername/your-virtual-directoryname will point to c:\yourvirtualdirectory and vice versa.
This should become clearer once you’ve read getting started with PHP part 4.

Getting Started with PHP # 2

Ok, to get on with some PHP we need to download the engine, what is that…? well…the php engine is something that you install to your machine that allows IIS to process PHP pages. When initially installed IIS will only run certain types of pages, these include .htm, .html (these are both the same) and .asp(Active Server Pages).
Active Server Pages are a Microsoft technology so naturally Microsoft made IIS able to process .asp files. HTML is what is called an open standard and has been around for ages, and is an industry standard language(default if you like) for writing webpages so it would not be very practical if IIS web server did not run HTML pages(see for more info)

So in order to make IIS run PHP pages you need what is called a plugin, or more precisley a script engine.

So how/where do you get the PHP script engine?
Simple, navigate (open a browser and go to…) to and you can download it from there. I am not going to go into much detail about downloading the php engine as i am assuming you all know how to download files and use the web to a basic level. I will recommend one thing though. Download a Windows Binary (i am assuming you are using windows) and get an installer they are clearly labelled on the PHP site, also i recommend version 4.3 and above…at the time of writing they were the most stable versions.

After your files Downoads
Once the file has downloaded, find it on your hard drive and open it, it should(if you got the windows installer) take you through an installation wizard, all being well. Now its pretty straight forward, keep pressing next. You will get a couple of options about a mail server, leave those as they are, and then something about the IIS version. Now, to be on the safe side. set it to version 4.

If everything went well then you can move on…to getting started with PHP part 3!

Getting Started with PHP

So, Getting started with PHP huh? now you may have noticed that this site, was all made from .htm files. You are right in thinking that I made it entirley in HTML. The reason for this is simple, because I didn’t know any back then! Plus there are also some things we need to do before we start coding PHP.

The Following set of tutorials details how to set up your PC to start writing PHP scripts!

Right if you are the average windows user you will probably be supprised, like i was, to know that you can turn your PC into a web server for your own personal use, and if your on a network, others will be able to see your pages once you’ve made some.

So how do we do this?

Setting up Internet Information Services on Windows XP
OK, to start with, from your desktop, click the start button, settings, control panel.
In the control panel, select “Add/Remove Programs” and Click Windows Setup or add/remove windows Components

Add/Remove Components in the Control Panel - This is to make windows take a look at what<br /><br />
snap-ins are currently installed on your machine.
Add/Remove Components in the Control Panel – This is to make windows take a look at what snap-ins are currently installed on your machine.

A list of programs should appear, ones with ticks next to them are installed, ones without are missing.
Scroll down and put a tick next to Internet Information Services(IIS) and press next. Windows then does some jiggery pokery and installs IIS or the web server bit to me and you. Please note this is for XP pro users only and you will need your windows disk for this bit.

Boring Part 1 over – Lets get the things needed to do some PHP with!

You’ll need to check out Getting Started with PHP pt 2 for that!