IBM developerWorks: Introduction to PHP – Finally, the perfect language for dynamic content & database interaction

[ Thanks to Shailendra for this link.

“PHP started out as a small open source project that evolved as
more and more people found out how useful it was. Rasmus Lerdorf
unleashed the first version of PHP way back in 1994. It has been
picking up steam ever since and is now at version 4.0.3 with
numerous improvements and refinements over the original

“PHP is a scripting language that is embedded in HTML and
interpreted by the server. It can be used to manage dynamic
content, work with databases, handle session tracking, and even
build entire e-commerce sites. It works well with a number of
popular databases, including MySQL, PostgreSQL, Oracle, Sybase,
Informix, and Microsoft SQL Server.”

“What’s so hot about dynamic content? Let’s say you’re managing
an e-commerce site with 10 products. It’s not that difficult to
hand-code ten static product pages with all the requisite
information, forms and such, provided your products don’t change
often and you don’t anticipate much growth. However, let’s say you
add ten more products this month, and then more next month, and
occasionally prices change or you want to change the look and feel
of your site. Then you’re stuck re-coding dozens, maybe hundreds,
of static pages by hand.”

“On the other hand, let’s say you start by creating one page
that is called product.php. Instead of holding static information,
it’s coded to pull information out of your product database and
build a page dynamically. You then have one meta page that can
serve up one or one hundred or even a hundred thousand unique pages
based on information stored in a database. Rather than requiring a
Web master to spend an entire day doing nothing but monkey-work
updating static Web pages, the information can now be updated at
the same time the information is changed in the company database.
You eliminate the headache-inducing lag between the time
information is changed in the database and the time it makes its
way onto the Web site.”

Complete Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis