PHP and HTML
Here you will learn some of the differences
between PHP and HTML and learn some basic things.
First of all, you must know what PHP
and HTML are. Both are web languages used for coding and creating web
sites. PHP stands for Hypertext Preprocessor and HTML stands
for Hypertext Markup Language.
If you think both are similar, You are wrong.
PHP is a more complicated web language starting from the features you need to start with, PHP needs a server that supports it, means that you must get a server system (such as WAMP) installed on your pc or get a web host that supports PHP.
The coding in PHP is a little harder but its plenty of features. You can make a little script or a big one as vBulletin. PHP may be easy to understand but hard to use.
PHP can use variables (a code that stores
information) like:
<?php //Starting PHP quotes
$myname = "[First Name Goes Here]"; //This variable
stores my first name
$mylastname = "[Last Name Goes Here]"; //This variable
stores my last name
echo "Your full name is $myname $mylastname";
//This will display your name and your last name, echo is for displaying
text or variables in the site.
?> // Ending PHP quotes
HTML is an easier language but don't think it's not plenty of features, it has many that PHP doesn't have. Basically HTML is used for designing the site look and inputting the text, forms, etc. You can see HTML coding in your PC without a web host or server.
Here is a basic HTML example:
<html>
<head>
<title>My new site</title>
</head>
<body>
<img src="hello.gif" /> <!—
That will show the image hello.gif ->
Hey, how are you? <!— Simple text
->
</body>
</html>
Another thing you should know is that
PHP and HTML make a really good combination, PHP can store the information
and have the interfaces while HTML shows it all.
Most of web scripts used at sites like
forums, blogs, content managers, etc. are coded with PHP and HTML
There are many sites on the web where
you can learn these languages from, Here I posted two very little tutorials
trying to explain a little of each language.
PHP also uses MySQL databases to store
private info and other info in another way, PHP will use the info stored
at the database for the site. I have a good example in this case, I'm
sure you've seen registration forms before, well, most of these forms
are made using PHP, HTML and databases.
Examples of Use
PHP can:
HTML can:
Tools you may need
Here you will see a list and a description
of some tools used for coding and designing graphics, PHP tools, etc.
For coding:
You won't need much, just a rich editor
like DREAMWEAVER or you can simply use NOTEPAD. Dreamweaver is recommended
because it will be easier to use and help you with some codes.
For graphics:
You will need a graphic creator for designing
the look of your site. Photoshop can be really useful for this kind
of job.
For PHP:
There are many things needed for letting
your server show the scripts. You will need a server system like WAMP,
google it and you will find it easily, another thing you will need is
the php source code, it's available at www.php.net but if you get WAMP, it comes with PHP, MySQL
and more things included. MySQL are the databases used for php, you
connect to them and store information there.
That's all you will need for starting. If you need tutorials, you can start with one of these sites:
Conclusion
PHP and HTML are web languages with different
features each other, both can be used for designing a site but it's
recommended to use both in order to have a well made page. With PHP
you can make most of the interfaces and actions while HTML shows it
all and design the site look.
No language is better than other, but ones may have some features other doesn't, I think that a language alone is nothing, you will need 2 or more to have a perfect site.