Inserts and Queries
Instructions on how to viagra some basic queries and inserts are here. At the completion of this tutorial you will be able create a page which will let people create usernames and passwords.
- First create a new .php file. You’ll need to create a basic form which posts to itself. The form needs to have 2 input text fields named “username” and “password” along with a submit button. The code for this is displayed below, I recommend just copying the info below and pasting it into your php file.
- Now that you have a form setup which will send information to you we get on to the php coding.
- Inside the code at the top of the page (above everything) create a section for your PHP code <?php ?>
- Your first step will be to receive the variables sent by the form, afterall if no variables are sent theres no reason to waste loading time. So add to the script a bit with the following. Form data is contained viagra a global variable labled $_POST. You can then access the
individual fields by changing the name from “username” to whatever you wish.<?php
$username=$_POST['username'];
?>
- Now we’ll need to test to see if there was any information in that variable. This code just performs a check, to see if what is inside the parenthesis () is true.
If it is true then it will do something else (that something is contained within the { } tags. In the statement if ($username) we are saying if something happened to $username do the following.
<?php
if ($username)
{}
?>
- Finally we’re on to the real query section. Here we will need to define the other variables of $password and $uid connect to the database. Check to see if any other users already have the chosen username. The insert the new username and password combination into the database. First lets connect to the database. Remember all of this code will be within the { } tags from the if statement in step 5.
<?php
if ($username)
{
/* you need to connect using the proper username and password if
you installed the wamp server and didn't change any settings your
username will be 'root' and your password wil be blank
the below is a standard connect with password and usernamemysql_connect("localhost", 'yourusername', 'yourpassword')
the below is what you can use if you still have the default wamp
mysql_connect("localhost", 'root')
installation settings*/
or
die("could not connect");
/* by adding the "or die" on to this you make the system report
an error message. If theres a problem*/
mysql_select_db("school");
//Please choose the database name you created in the last tutorial;
}
?>
- Ok now that you are connected to the database we should create the variables you’ll be using. First the password, this is basically a repeat of Step 4.
<?php
$password=$_POST['password'];
?>
- Now lets create the final variable the Unique ID. This will allow you keep track of data in an anonymouse way. In this step there are several functions including a random number creator, and a while loop.The random number creator will come first, this allows us to create a new ID for this user’s account.
<?php
/* the statement below will set $uid as a random number
between 1 and 999,999. This gives us a 6 digit unique
identification number.*/
$uid=rand(1,999999);
?>
Now we’ll run a check to see if there another ID equal to the newly generated one above. This is the first query.
<?php /*query the table, this returns information
regarding a row with the random id above.*/
$query="SELECT * FROM users WHERE uid='$uid';";
$result = mysql_query($query) or die(mysql_error());
//place the results of the query into a variable
$row = mysql_fetch_array($result);
/*create a dummy variable with the value of username from the table.
This will be blank if there aren't any users with the same id number.*/
$dummy=$row['username'];
?>
The following which is a loop which will means it will happen again and again as long as the requirements are met.
<?php
//while the $dummy != (is not equal) to "" (nothing) do what is inside the {}
while ($dummy!="")
{
//first make dummy equal to nothing
$dummy="";
//set the uid to a new random number
$uid=rand(1,999999);
//query the database
$query="SELECT * FROM users WHERE uid='$uid';";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
/*set dummy as equal to the username, if the uid was
unique then the username will now be equal to ""*/
$dummy=$row['username'];
}
//finish the loop with a }
?>
- Now we’ll check to make sure the username isn’t already in the database and then either show an error message or insert the new user/password into the database.
<?php
/*query the database, similar to the first part of step 5,
however instead of uid, we're looking at username*/
$query="SELECT * FROM users WHERE username='$username';";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
/*set dummy as equal to the uid, if the username was
unique then the uid will now be equal to ""*/
$dummy=$row['uid']; //if the username alraedy has information in it then display an error mesage
if ($dummy!="")
{
echo "Sorry $username is already registered, please choose another username";
/*notice I used $ in front of username. This will make the
variable appear in the error message*/
} /*or else do this (so if the if statement above isn't true insert a
new row into the database.*/
else
{
$query="INSERT INTO `users` ( `username` , `password` , `uid` )
VALUES ('$username', '$password', '$uid');";
$result = mysql_query($query) or die(mysql_error());
echo "username: $username, password: $password created sucessfully";
// the echo gives a success message which details the username and password.
} ?>
PHP Posts and Redirects
Now we’re going to add in some functionality to your php. We’ll make a form which checks a person’s age then either redirects them to a different page, or displays an error message.
- First off is some html code for a form, the form will send via post method one variable for age.
<form method=”post”>Age <input name=”age” type=”text” id=”age”></form>
- So now you’ve got a basic form that has a field for age. Now lets put in some a php code area and get started <?php ?>
- Now we need to put a variable there to catch whatever is posted back to the document. You can assign a vairable to a post like in the example.
<?php
/*$_POST is the method for describing a posted variable, then you describe the id of
the variable within the [' '] tags.*/
$age=$_POST['age'];
echo "Age: $age";
?>
This should print out Age: if you just start the page, and if you submit an age it will say Age: [your age here].
- Now lets add in a simple if statement determining if the age is below a certain point, if it is say below 13 we’ll assign a variable $error a sentence detailing how this site is made for those 13 or above.
<?php
$age=$_POST['age'];
if ($age<13) {$error="Sorry this site is only for those aged 13 or above."}
/* just having the variable in an if statement's ()s checks to see if the
variable has been assigned anything or not. If it has it will run the statement.*/
if ($error) {echo $error;}
?>
Depending on what you submit to the page this will either print nothing or it will print Sorry this site is only for those aged 13 or above.
- Lets add in an else statement so that if they are able to see the site it will tell them that the site is redirecting them there now.
<?php
$age=$_POST['age'];
if ($age<13) {$error="Sorry this site is only for those aged 13 or above."}
if ($error) {echo $error;}
else { echo "Your old enough to view the site, redirecting you now.";}
?>
This will either tell the person they’re too young or tell them they’re old enough and the site is redirecting.
- The final part of the script is actually redirecting a person if they are of the correct age. So add in the following code to the redirect. header(’Location: http://www.example.com/’);
<?php
$age=$_POST['age'];
if ($age<13) {$error="Sorry this site is only for those aged 13 or above."}
if ($error) {echo $error;}
else { echo "Your old enough to view the site, redirecting you now.";
//remember you would be changing example.com below to whatever url you need.
header('Location: http://www.example.com/');}
?>
This will either tell you that your not old enough or redirect you to http://www.example.com, This lesson is now over.
How to do PHP While Loops
Now that you know how to use if then statements lets move on to a basic loop.
- Lets get started by opening your favorite editor and starting a fresh source page. Start off with the basic coding which denotes a php area. <?php ?>
- Now lets add in a variable and an echo statement. Give one variable a value of 0 then echo it.
<?php
$x=0;
echo $x;
?>
This should print out 0.
PHP generally starts many constructs at 0, not at 1 so its generally better to start counting from 0 in programming..
- Now lets add in a basic loop. The while statement is very similar to an if statement except a while loop will do the things as long as its conditions are met (or until timeout which is generally 3-5 minutes depending on your server settings).
<?php
while (/*requirements*/)
{
//Stuff to do
}
?>
This won’t print anything yet
- Now lets make that actually do something. We’ll have it run 5 times, so while $x<5 do something. Of course we have to increase $x inside the loop otherwise it won’t end. So the only action we have right now is adding one to $x, we can do this with $x=$x+1; or in english x is equal to x +1.
<?php
$x=0;
while ($x<5)
{
$x=$x+1;
}
?>
This won’t print anything yet
- Now lets add on an echo so we can see the progress of $x counting up towards 5.
<?php
$x=0;
while ($x<5)
{
echo $x;
$x=$x+1;
}
?>
This should print out “12345“
- Ok now there is a better way to add one to $x and thats a special operation which is coded like this ++$x;
- Now lets add some text to each echo so it looks a bit nicer. You can print a variable and letters by using an echo with quotes. so in this statement echo “x: $x”; the first x will simply be the letter x and the second one which is preceded by a $ will be the variable.
<?php
$x=0;
while ($x<5)
{
echo "x=$x";
++$x;
}
?>
This should print out “x: 1x: 2x: 3x: 4x: 5”
Now this doesn’t look much nicer (actually it looks worse!), but we’ll fix that in the next step. - A PHP echo will place code directly into the html of a file. So if you type html code into the echo you can use different html functions to change displays. In this way you can make things bold, manipulate css styles etc. For now we’ll just add a <br> to the end of each line this will make the numbers go to different lines.
<?php
$x=0;
while ($x<5)
{
echo "x=$x<br>";
++$x;
}
?>
This should print out:
x: 1
x: 2
x: 3
x: 4
x: 5
Basics of Link Building
When considering the process of getting your site ranking highly on web search engines, the first thing most people will tell you is to develop your incoming links. To that end, there are a few things you should know first:
- What is link building?
- Why is link building important?
- Where can I build my links?
- Can I buy links?
What is link building?
Link building is, in short, the process of building links to your site in order to increase traffic and rankings in search engines. There are a number of ways to do this, including getting your site listed in directories, developing a network of similar niche sites, promoting your site commercially through some well-known media sources, or even simply having your friends and family link back to your site from their own. The key to this is developing quality, natural links (i.e. not listing your site on rubbish link farms that search engines tend to overlook or using other dubious link building methods such as spam to promote your site on the web).
Why is link building important?
In today’s fast-paced, niche-centered web, ranking high on a search engine for specific keywords or phrases is important to attract the hundreds of millions of people around the world who use the internet daily to come to your website. To do this your site needs to be seen by search engines as having relevance to a particular searcher’s needs when they look for specific words or phrases. Making these search engines see your site as being relevant will help boost your ranking in search engine results and increase your traffic. The most effective way to boost your ranking is for other websites to link back to yours. When this occurs it is essentially a vote by Site A (the site linking in) to Site B (your site). The more votes a site has, the more relevant it is seen by search engines to suit their particular customer’s needs. The more powerful the site is casting the vote (such as .gov, .edu, or other well established sites) the more powerful the incoming link is.
Where can I build my links?
There are a number of different ways that you can build your links. As mentioned earlier, some of these can even be your close friends and family that may have their own websites that may be similar to your own. The key here is those last four words: similar to your own. Many times people ignore this part and develop links from rubbish link farms that are ignored by most SERPs and contribute no value to your site. Make sure that any links that you generate are also followed. If a link has the “nofollow” attribute attached to it then it does not contribute to your site’s rankings. SEO Book has some useful tools for Firefox users that can allow you to check these and other website information such as Page Rank (again, still a bit important, but not the end-all, be-all in today’s SEO world) as you browse. Simply sign up for free and you can gain access to them.
Submit your sites to specialized directories as well. Many new directories open each day and offer site submission for free to get their directory off the ground. These can be found in many forums around the internet, so keep your eyes peeled. You can also try submitting your site to DMOZ, a very large user-run directory that many other directories draw off of.
Just remember, try and keep your backlinks focused and quality. Quantity may be good, but not if they’re not contributing at all to your website.
Can I buy links?
The simple answer is “Yes, you can, though it’s not encouraged.” You can search the web and find many individuals or companies out there that are willing to sell links from their sites back to yours. Sometimes this can possibly help give your site a large boost to its rank. It’s encouraged not to do this, however, as many search engines tend to see this as an attempt to boost your ranking via money rather than actual relevance to users. Currently many search engines such as Google and Yahoo! have advanced search algorithms in place and are constantly updating them to find and discount paid links to sites in order to create a more balanced, fair experience for their users.
Basics of Critical Website Components
There are a few key components that are critical to optimizing a site:
- Titles, URLs and Other Meta Information
- Site Accessibility
- Site Layout
Titles, URLs and Other Meta Information
Some of the most over-looked aspects of websites, these three items play important roles in search engines determining the overall relevancy of your site and, in turn, your ranking. Properly using title tags (H1, H2 etc.) for example helps search engine spiders determine what key information exists on the page and allow you to target keyword phrases that may help you drive traffic to specific sections of your website. This can be coupled with proper meta information (meta tags and descriptions) that search engines can use to help track information within a page. While it may be true that meta descriptions may not play as much of a role in search engine results now as they did in the past they can still help drive traffic to your site if the description is relevant and increases click-throughs.
Good looking URLs can also play a good role in attracting and retaining visitors as well as helping you rank in search engines by increasing the keywords on page. Compare the two following examples:
Sony mylo Internet Devices
http://www.sonystyle.com/webapp/wcs/stores/servlet/CategoryDisplay?catalogId=10551&storeId=10151&langId=-1&categoryId=3711&SR=nav:shop:mp3_portable_elec:personal_communicators:ss&ref=http%3A//www.sony.com/index.php
Wal-Mart’s In-Store Free Samples and Trials
http://instoresnow.walmart.com/In-Stores-Now-Free-Samples-And-Trials.aspx
In the first example the long string of text in the URL is a dynamic URL that, while it may be useful for database queries, is not very user friendly. At a quick glance the website visitor does not know what page they are on nor could a search engine easily determine the relevance of this page to a user. In the second example, the URL is clearly laid out and is easy for a user to determine exactly where they are on the page and navigate accordingly. This is important to plan your site for from the beginning a site re-work later on to correct this can be both quite costly and time consuming.
Site Accessibility
Make sure that your site is fully accessible and working at all times. This means no broken links, no missing pages, no server downtime, and appropriate file sizes for each of your files. From a site visitor standpoint this means that your site is appealing to all visitors, they can easily load all items, and they can have an enjoyable experience on your site. From a search engine standpoint, excessive loading times can actually cause search engines to not index some pages on your site, while broken links may also stop some indexing from occurring. Should this happen your site may not fully rank for what you are targeting and as such your traffic will suffer significantly.
Make sure that all of your site content is accessible to search engines as well. Text and other items in picture format, for example, can not be searched for by engines and as such if it is not attributes a proper alt text you may lose traffic on key areas.
Site Layout
Finally, ensure that your site layout is managed properly in order to allow for both users and search engines to access all information on your site quickly and effectively. Information should never be buried more than two clicks away from your home page (or three clicks, in the case of larger websites). This helps ensure that the information is readily accessible to your viewers and helps ensure that all pages are indexed appropriately in all search engines. You can also make use of a sitemap and 301 redirects to make sure users and search engine spiders are directed to the proper location on your site rather than lost in outdated information. Finally, as a rule of thumb, make sure all information located on the website is laid out from broad/general information down to specific ideas. This both helps website visitors to locate information they are interested in as well as inform search engines that your site is highly relevant and on topic.
View previous post in Basics of SEO series, Basics of Keyword Research
Basics of How Search Engines Work
Search engines work with a number of different algorithms that can be referred to as “spiders” that search or “crawl” the web for sites that are relevant to specified keywords users input. While these algorithms become quite complicated and look at a number of different aspects of websites there are a few key components that search engine spiders look for in their searches. Some of the important factors for search engines are:
- Links
- Content
- On-Page Factors
Links
When one site links to another on the web this could be seen by a search engine spider as a vote for that website. In short, if site A links to site B, that is essentially a vote by site A for site B. The more links that come in to a site the more the site is seen as valuable content that may benefit a user. The larger power the site has that casts the initial vote (site A in my example) the more value the incoming link has overall.
Content
Content also plays an important factor for websites. Websites that have content that matches closely to specified search terms allows customers of search engines to have better user experiences. Search engines consider sites with high quality content to have more authority on a topic, just as individual consumers would go to the most experienced or knowledgeable professional for advice or quality service. The more authority a site has, the more relevant it is considered to be to a customer’s search query to satisfy the customer’s needs for the search.
On-Page Factors
There are a number of on-page factors that play important roles in search engine ranking of sites. Sites with good page titles and headers that relate to specified search terms, for example, tend to carry more weight than pages where titles and headers are unrelated to search terms yet their content is. Proper usage of H1, H2 and even H3 headers that relate to targeted search terms in web pages can help bolster web page ranking than those who simply describe the subject in their content.
Complex Algorithms to Combat Spam
In each of these areas search engines are constantly waging a war against link spammers that post links on a wide range of sites attempting to increase their relevancy to particular terms. Some website developers use this to their advantage to gather ranking in search engines and drive more traffic. To counter these rubbish links search engines are regularly developing more and more complex algorithms (with thousands of factors that affect search engine results) to search the web, ignoring or eliminating these shady websites.
View previous post in Basics of SEO series, What is Search Engine Optimization (SEO)?
View next post in Basics of SEO series, Basics of Keyword Research
Basics of Keyword Research
Selecting the proper keywords to target can be considered the most important step in getting your site to rank in all major search engines. Without targeting the proper keywords to match your intended target you could easily lose great amounts of traffic or rank in unrelated areas that people would rarely see that would hurt your website and possibly your business as well. To that end, there are a few basic steps you should go through when determining the proper keywords to focus on in your website development:
- Idea Generation
- Visitor/Customer Research
- Keyword Research
- Performance Tracking
1. Idea Generation
Consider all possibilities of what your site’s visitors or potential visitors will be looking for when searching online for information. This is a general brainstorming time and not one to rule out items. These could be single words, short phrases, or even longer, more specific phrases that would have strong relevance to your site and what you are offering.
2. Visitor/Customer Research
If your site has been up for some time research into what the visitors like. Do they tend to go to one particular area on your website? Do they generally come to your site by using particular search terms? Even a free program for tracking visitor’s like Google’s Analytics can be of help in this.
Haven’t had a site for long but you’ve have had a business operating for quite some time? Do the same research you would conduct online into your customers by reviewing purchase logs, conducting surveys, reviewing historical records…any records you may have for your customers that you have been using over the years to adjust your business should be considered targets you should look at.
Once you have gathered information from your customer research you can then begin eliminating some of the words or phrases you generated in your Idea Generation stage and move to the next stage in your research.
3. Keyword Research
Now that you have a few basic keywords to look for, do some research into each and find out its benefit to you. Using some easily accessible tools such as Google’s Adwords Keyword Tool you can find out how often internet users search for particular terms and see what may be most relevant to you. If you are an online dog toy company, for example, people regularly search for the term “dog toys” according to Google’s tool roughly 301,000 times a month, while a focus on “buy dog toys” gets roughly 590 searches a month. The number of searches for the second term may be less, however at the same time the searches for this term would most likely generate better leads to your site and would increase your sales revenues over someone looking for a more general term.
You also need to research into what your customer’s intent is when searching for a particular search term. In my previous example, if I search for the term “dog toys” my goal may not be to buy dog toys but to simple see what dog toys are out there. Maybe I am even looking for examples of ways to design my own dog toys at home. The phrase “buy dog toys”, however, is much more specific and it is reasonable to assume that if I were to search for these terms I would be a potential customer.
As you research into the various keywords always bear in mind “what is the searcher’s intent in looking for these words?” and “how will my site satisfy that need?”
4. Performance Tracking
Once you have established your key terms and begin working them into your website continue tracking your site’s traffic for those terms. Regularly check your traffic sources and terms being searched for and adjust your site accordingly. This can focus your site to meet visitor demands, increase your ranking and conversions, and ultimately increase your site’s profitability overall.
View previous post in Basics of SEO series, Basics of How Search Engines Work
View next post in Basics of SEO series, Basics of Critical Website Components
What is Search Engine Optimization (SEO)?
Search Engine Optimization, commonly referred to as SEO, is the application of effective design and content management techniques to drive traffic to a website via natural or “organic” traffic from search engine providers. These providers are typically engines such as Google, Yahoo, MSN (and now Bing, Microsoft’s newest search engine) Ask, and AOL (powered by Google), with a few other search engines making up a fraction of the other online traffic.
When using a search engine the more relevant a website is to the specified search query the higher it ranks on a page. For example, a website selling various automobile parts may be listed somewhere in the 464 million search results on Google for the keyword “cars”, however websites dealing with cars specifically (such as cars.com or cars.gov) are generally seen on the first page of the search results.
Search engines provide results for users based upon complex calculations or algorithms that are designed to apply information retrieval (or IR) processes to their immense databases of websites to determine which websites best match the user’s search criteria and display the results in descending order, beginning with the most relevant search and ranking downward from there. With over 182 million websites existing today effective IR processes are important to provide searchers with exactly what they intend to search for.
SEO is the process of improving websites to increase their relevancy to specific search teams and increase the ranking a site has in search results. The higher the ranking, the more likely the site is to receive traffic from web searches. Applying SEO to a website can help make a website more accessible to search engine IR processes and, in turn, increase its rank and profits.
View next post in Basics of SEO series, Basics of How Search Engines Work
If Then Math PHP Statements
- Lets get started by opening your favorite editor and starting a fresh source page. Start off with the basic coding which denotes a php area. <?php ?>
- Now lets add in some basic variables and an echo statement. Give two variables a value of 2, and a third variable a value equal to the previous to variables added together.
<?php
$x=2;
$y=2;
$number=$x+$y;
echo $number;
?>
This should print out 4 .
- Try changing the + to different mathmatical operators these are:
/ Divide
* Multiply
- Subtract - Now we’re going to add in an if then statement. Basically if statements are logical, if certain requirements are met then do something. An if then statement looks like this
<?php
if (/*requirements*/)
{
//Stuff to do
}
?>
The if statement is one of the few that doesn’t require a ; after it.
- Now lets a simple statement that says, ‘if’ ‘$number is not equal to four’ ‘echo Thats not Four’. This code looks like this.
<?php
$x=1;
$y=2;
$number=$x+$y;if (
$number!=4)
{
echo "Thats not Four";
}
?>
This should print out “Thats not Four”
The comparison operators in PHP are as follows:
!= Is not equal to
== Equal to
> Greater than
< Less than
>= Greater than or Equal to
<= Greater than or Equal to - Now lets say you want to check if the number is between 5 and 10. You’ll need to use two checks in the if instead of one. So you need to say ‘if’ ‘$number is greater than or equal to 5 and less than or equal to 10′ ‘echo number is between 5 and 10′. The code for this looks like this:
<?php
$x=1;
$y=2;
$number=$x+$y;if (
$number>=5 && $number<=10)
{
echo "number is between 5 and 10";
}
?>
This shouldn’t print anything
Logical Operators for PHP
&& and
|| or - Now this is fine and all except what, happens when your number doesn’t fit the criteria? Nothing happens. So lets add on the final part of an If Then statement. So now PHP will go if $number is between 5-10 do this, or else do this. The code looks like this:
<?php
$x=1;
$y=2;
$number=$x+$y;if (
$number>=5 && $number<=10)
{
echo "number is between 5 and 10";
}
else
{
echo "number is less then 5 or greater than 10";
}
?>
This should print number is less then 5 or greater than 10
Hello World
A small step for PHP (Hypertext Preprocessor) everywhere is just a simple “Hello World”. So we’ll out line a few basic commands here.
- Make sure you have a PHP enabled server on your computer. My preference is Wamp Server it installs a complete package with the latest PHP, MySQL tools and systems.
- Use your favorite processor to start a .php file. If you aren’t sure which allows you to do this, simply use notepad. If you use notepad when you save the file, choose all files from the list, then make your filename end in .php You should make sure that you save the .php file to your PHP testing server, generally on your local computer this folder will be called WWW.
- Second you need to tell the internet browser that your starting a section that will have PHP code inside of it. so you should use the basic identifiers to incase the code.
<?php ?>
Everything contained within the <?php and ?> will be considered PHP code. All functions inside will be processed before the website loads. For this reason if there is an error in the PHP code, the entire website will likely not work, and either show an error, or a blank page. For this reason its important to test all PHP pages before launching them.
- Now we’ll move on and create a new variable. Think algebra, ‘X=4‘ etc. In PHP all variables have always have a $ sign. Therefore it would be ‘$X=4‘. Finally you have to add one more thing to make this a complete variable declaration (actually making $X equal 4). You need to add a colon ; after. This lets PHP know that your done with your command. The complete code looks like this.
<?php $X=4;
?>
So now X is equal to 4. Of course the object of this lesson is to write “Hello World” so instead of making $X equal to 4 lets make it equal to “Hello World”.
<?php $X=”Hello World”;
?>
Quite easy to change isn’t it. PHP is unique in that it defines variables based on what you put place in it. This makes it much easier then many programs since you don’t often have to worry about what types of variables are.
- We’re nearing the finish of our short tutorial. Now you need to actually place the words “Hello World” onto the screen. This is done by using the ‘echo’ function. The code works like this ‘echo‘ ‘$variable‘ ‘;‘ this allows you to place whatever is in the variable onto the screen. So lets place that into our code from above and make the program work.
<?php $X=”Hello World”;
echo $X;
?>
- Now you need to make sure you saved this to a place on your PHP enabled server. Go to it with your favorite web browser and you should see the words “Hello World“. Feel free to change the words around and experiment with it.
- Common errors:
- Forgetting to place a ; after a statement.
- Capitalization can cause no end of problems. PHP is a case sensitive programming language, which means that you could have two variables, $X and $x and they could be two completely different things! You also need to call the functions by their correct name, for example if you said Echo instead of echo the above function wouldn’t have worked.
This is the end of the first PHP Tutorial
