[php Benifits?] -



php Benifits?

Discuss php Benifits?



Posted by: Jso

Hi. I was wondering how to make websites in PHP, what editors, and how its like. Also, can someone tell me what the benifits of PHP are? Why is it better then HTML? Thanks alot.



Posted by: Hackerman

I honestly have no clue what the benefits are. There are probabaly some more short cuts and what not and I believe its easier to implement certain things in your site than HTML.



Posted by: Larry

well, PHP really has nothing to do with HTML as a programing langague.

PHP is a server side language
HTML is client side

PHP basically has unlimited funtionality
HTML is pretty limited

but again, your comparing apples to oranges.
A better comparision is PHP to ASP
and
HTML to Javascript (well, sort of anyway)



Posted by: Jso

So people can program in php and not no any html?



Posted by: petogaz

[QUOTE][i]Originally posted by Jso [/i]
[B]So people can program in php and not no any html? [/B][/QUOTE]

i dont know if that's possible. the easiest way is to incorporate PHP codes into HTLM. that would work fine.



Posted by: Jso

But then how to you get the .php instead of the .html?



Posted by: Hackerman

when you are finished writing the code in note pad save it as

*filename*.php ..... lol



Posted by: Jso

...in doing this, there is nothing special about .php. So whats the point in making it?



Posted by: ADZ

you cannot make a site in PHP, you use HTML, but you incorperate things into your site. For example: A login Script so that you can go to 'special' pages, you will need to write a PHP code to do this (cannot be done in HTML). You end u saving the html file as a .php file because it has PHP in it.

Does that make sense or am I rambling?



Posted by: petogaz

one more inforamtion, keep in mind that PHP is a dynamic language and HTML is a static one.
cheers.



Posted by: XT

Ok html for every site it is used. Php just helps it. The advantage of it is that it loads the stuff before the client gets to the site so ur gaurenteed it will be up there but the clients browser may not support it(old browsers). It is embedded into html sort of like javascript. u start it with tags and close it with tags. Use variables and such. Very easy to learn and incoperate in design so u should use it



Posted by: darwinsape

like someone mentioned, PHP and HTML are completely different, HTML is used to create things on a screen, but PHP is much more. PHP can be used to create dynamic counters, server side includes, dynamic pages based on what browser or OS the person is using, or to store things in a database such as MySQL...the possibilities really are endless, it's a programming language that can be embedded inside a webpage (you can make a PHP script and run it on a linux box without it having anything to do with a webpage, its a language that doesnt need to be compiled).
The only trick with PHP is that is must be installed on your server, apache and other browsers can do HTML, but PHP is completely different, therefore php must be installed.
I personally use PHP for everything, even pages that dont have any PHP code (although PHP require is best for SSI) because it's easy to add sometime in the future.
~Ben



Posted by: Jso

OH..ok..thanks guys. Also, im trying to use PHP for a template, but I cant view what is going on. What do I need to install on my computer to view it and to edit it? Thanks!



Posted by: BlazingWolf

You need to install PHP, and then Apache. Then you will have to configure Apache for PHP. If I knew of a good guide I'd link you but I haven't found very many good ones.



Posted by: darwinsape

the best guides i have found are in books on php and apache. I cant remember the name off the top of my head...i'll have to edit this post later and add it. I got it from a teacher of mine...a little out dated (it mentions old versions of both) but hey...with a little improvision it works.
Are you running linux or windows?
It's easiest to just upload and preview from a server however.