PHP scripting for dummies!?
I’m not asking someone to explain to me how to script it. I just don’t really understand what it is. I’m not experienced with programming and scripts but I am extremely advanced in HTML (and some JavaScript).
So I guess I am asking what can PHP really do to enhance my website?
Thank you!
I echo what others have said above but would also add that PHP (and ASP) runs on the server. So unlike JavaScript, you don’t have to worry about whether or not scripting is enabled.;-)
Play around with it. If you’re already using JavaScript, you probably understand basic programming concepts like loops and arrays. PHP or ASP would be a next logical step.
Several things:
Allows you to make the site dynamic based on sessions, database call, form submissions, etc.
You do not expose the code to the client
Simple way to rapidly code sites, but breaking parts of a page into components and using includes to dynamically generate a page
There are a multitude of scripting languages such as ASP, PHP, JSP, Perl, Ruby On Rails, etc.
References :
HTML gives you a static site – it sits there. PHP is a programming language (HTML is a markup language). What can it do? Display the results of database searches. Put a map and driving directions on your site for your user. Put an editor on your site. Anything any computer program can do.
References :
yes I agree with the above comment, it take so much time out of creating websites.
You can create multiple pages in a fraction of the time using the include function and you dont need to worry about formatting every site when you need to change silly things like the copyright date (its a pain if you have over 3000 pages trust me)
Good Luck
References :
PHP can enhance any static website!
PHP stands for PHP: Hypertext Preprocessor
So the HTML passed gets "preprocessed"
This means that whatever your PHP code want’s to do get’s put into the HTML code before everything happens!
Site opened -> Php queries submitted -> HTML submitted to browser
So the user never even seens the PHP script.
With this, you can make just about everything dynamic and along with MySQL you can build advanced web applications such as:
eCommerce Solutions
Mailing Systems
Log in Systems
Browser games
and just about every thing in the internet!
A great tutorial can be found at w3schools.com, it will take you through the basics, after going through it you can go get a book from your local library and get to mastering it in no time!
A little example a php script…
<?php
echo "Hello World!";
?>
Everything get’s really easy once you get the hang of it!
References :
I echo what others have said above but would also add that PHP (and ASP) runs on the server. So unlike JavaScript, you don’t have to worry about whether or not scripting is enabled.;-)
Play around with it. If you’re already using JavaScript, you probably understand basic programming concepts like loops and arrays. PHP or ASP would be a next logical step.
References :