View Full Version : what's so good about php?
bball_1523
01-06-2003, 12:00 AM
I'm kinda confused, I read a tutorial on php, but I still do not understand why it's easier or more useful to use php than regular html.
What are good examples of using php?
Like creating links? Pics? Music? etc? What is it important for?
Would html work better or php?
thanks
bonzai
01-06-2003, 01:18 AM
using pure HTML to code creates simple web pages or static web pages, meaning the web pages don't change. What you code in there is what you get out of it. php is only one of the many languages which allow web pages to become dynamic, meaning it can display content on the fly, maybe depending on who the user is and other situations.
JSP is the best!!
bball_1523
01-06-2003, 01:19 AM
what kinda content does php create? Do you got any website examples? I just wanna create a video game site, with a good design and lots of content.
bonzai
01-06-2003, 01:33 AM
php is code that is embedded as a part of the html web page. When you access a web page that contains php and html, that page is interpreted or "compiled" on the fly, and results in a web page in pure html code only. So, when you view source on that web page, you will only see html coding and no php coding. PHP and other languages enable you to display dynamic data. PHP and other dynamic languages may be known as "server side scripting" since the code is compiled on the server side, and the end-user (the client side) is never able to see that code. This very forum uses PHP since web content is always changing, and content is catered toward each specific user. If you think about it, it is impossible to maintain a forum with only pure html, since it only is able to handle static data. More "elaborate" languages are needed to be able to handle the concepts of variables and such.
bball_1523
01-06-2003, 01:49 AM
suppose I'm a beginner..to web design
--what is dynamic data, is there an example, specifically?
-What's a good use for php while making video game websites?
bonzai
01-06-2003, 01:54 AM
Dynamic means always changing. In the dictionary, it would tell you that it relates to being in motion. U will want php when you have content that's always changing, such as this Forums, content in a page is always changing, because once I hit the submit button, php must be able to update the page and include my post in there as well. can be used for anything, use your imagination.
bball_1523
01-06-2003, 01:56 AM
alright cool,
So if I create a rollercoaster tycoon website, and have tons of downloads for rides, parks, trainers, etc.
Would php help update new rides on the page easier?
DrZaius
01-06-2003, 11:57 AM
Originally posted by bball_1523
alright cool,
So if I create a rollercoaster tycoon website, and have tons of downloads for rides, parks, trainers, etc.
Would php help update new rides on the page easier? Definitely. I would highly suggest picking up a book called PHP and MySQL Development, it will teach you PHP and MySQL (a database) as well as how to use them in web sites.
bball_1523
01-06-2003, 07:43 PM
I don't want to buy a php book and not read it all the way. i just want to learn a little bit of php for now, since I'm a beginner webmaster.
-Also I just want to use php, if it works a lot better, for downloads on my video game site.
-If there are tutorials out there on the net, I'd love to read them.
DrZaius
01-06-2003, 07:57 PM
http://hotwired.lycos.com/webmonkey/01/48/index2a.html?tw=programming
bball_1523
01-06-2003, 11:53 PM
Originally posted by DrZaius
http://hotwired.lycos.com/webmonkey/01/48/index2a.html?tw=programming
Ok i tried it out, got the Apache thing installed, but the php4 won't install.
I'm stuck at this webpage: http://hotwired.lycos.com/webmonkey/00/44/index4a_page10.html?tw=programming
---It said I may have a typo somewhere, but I copy and pasted all the codes they told me to paste in the different files.
-Can someone help me install php4 on my windows, maybe I have the wrong version of php4???????
Make sure the path to PHP in your scripts is correct. I'd suggest adding PHP as a module for apache that runs imbedded in the server. Read up on modphp, it's pretty simple to set it up that way and performance will be better as well.
The reasons php is so nice...
1) Compatbility, it's unlike any other client side scripting language (such as javascript) in that it just spits out regular HTML code so the pages that it generates will work in any browser that you need it to.
2) On top of being inherently flexible with compatibility, it very easily pulls data from external sources (such as a database) to make content easy to generate as well.
This forum is a good example. It's nothing but a database to hold the users, posts, etc. with a bunch of php scripts to grab the info and build webpages out of it. There are no "pages" per se in this forum at all, just data and PHP scripts to make it appear as if there were.
And since it's all done server-side, there are no performance issues to speak of no matter how much is on the forum, regardless of your internet connection speed or how much is on each page. To your browser it's just HTML.
Psychodic_Greak
01-08-2003, 07:33 PM
Actually, Everyone here is making a good point, but PHP is pretty much html/Javascript/dhtml/cgi, and other tools i have yet to hear about, all in one.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.