DevWebPro - August 3rd, 2001 The eZine For Web Developers ===================================================================== ===================================================================== Get ahead of the crowd. Become an Oracle Certified Professional. Increase your value and marketability in any economy. For a FREE Online Starter Kit, plus information on 25%-off FastTrack training, go to: http://devwebpro.com/rd/think_9i.html ===================================================================== ===================================================================== IN THIS ISSUE: 1.)... Editor's Note by Peter Thiruselvam 2.)... An Intro To Building Dynamic Sites With PHP ===================================================================== 1.) EDITOR'S NOTE Hi DevWebPro Readers, If your web server is not a Microsoft NT Server or a Windows 2000 server and you want to create dynamic content on your website, then PHP is your best bet. This article should be helpful to those of you who are just starting with PHP but somewhat familiar with programming languages. I've made it as easy to follow as I could. I hope that this issue sets you in the right direction, Best Wishes, Pete ===================================================================== ===================================================================== GET A FREE RIO! Audible.com is giving away the Diamond Rio 500 digital audio player when you become an AudibleListener™. What's that? It's the greatest deal on digital audiobooks on the Web - get 2 a month for only $15.95! Not bad considering the average audiobook on cassette will run you about 50 bucks. A limited number of Rios are available. So act on this unbelievable offer today! http://www.audible.com/ientry/freerio2 ===================================================================== ===================================================================== 2.) 2- An Intro To Building Dynamic Sites With PHP By Robin Baker What is PHP? Originally known as Personal Home Page Tools, PHP is a scripting language that is embedded into HTML much like Mirosoft's ASP (Active Server Pages). It can be used to do many different things that regular HTML is incapable of. A form and response page that would take two HTML files can now be done with one php file. Reading from and writing to a database is made simple now with PHP. Setting a cookie is an absolute cakewalk with PHP. What is the difference between PHP and JavaScript? Simply put, PHP is executed on your web server and the output is sent to your browser window as HTML. Conversly, JavaScript is sent with an HTML file and executed by the browser. The great advantage here is that the actual PHP script is kept hidden from the end user. What do I need to use PHP? Before we dive into the pool of digital candy that is PHP, let's have a look at what you need to get stared. PHP must be installed on the server where your website resides in order for the script to work. Unlike ASP (which will only work with mircosoft server software), PHP can be installed with almost all server types. If you are running your own server you can download PHP at http://www.php.net/manual/en/installation.php . Otherwise, you will have to contact your host and find out if it is installed. ===================================================================== Think Fast, Think Simple, Think Smart. Think Oracle9i. http://devwebpro.com/rd/think_9i.html ===================================================================== My first script. Now that we are sure that PHP is intalled on our host server, let's get to our first script. If you're familiar with any kind of programming language, you know what's coming: the infamous 'hello world'. Copy and paste the following text into a text editor and save it as 'hello.php' : Upload 'hello.php' to your server and view it with your browser. If all is well, then you should see the text 'hello world' staring back at you. View the source. You should see no sign of the original PHP script. Great, now let's get a line by line explanation of what happened: Line 1: - OK boys and girls, we all know what these do... Line 2: - Very important, tells the server that our script is finished, and it should resume treating the rest of the text as HTML. Line 6: - Refer to my comment on line 1. That just about wraps it up for my PHP introduction. In future articles I plan to get into greater detail about specific PHP features. I'll explore all the types of variabes used, the use of control structures, and even using PHP with MySQL. Until then, you can browse http://www.php.net/manual/ for a complete listing of the PHP language. Or go to http://www.phpbuilder.com. Both are excellent resources for questions concerning PHP. ===================================================================== 3- A Brief History Before you go around bragging to your tech friends about how you're the master of PHP you should visit: http://mx.php.net/manual/en/intro-history.php . There you can get a short description of where PHP came from and other interestng facts. Now, not only can you wow your friends with your PHP skills, you can play it off like you've been with it from the beginning. ===================================================================== About the Author: Robin Baker is a webmaster here at eZined.com. He also is the webmaster and owner of indirectdesign.com, a web and print design company on the forefront of design concepts. ===================================================================== Advertise to thousands of website developers! For ad details & prices, click... mailto:Susan@DevWebPro.com ===================================================================== We at the Editorial Team would like to thank all our readers for reading DevWebPro. We hope you find this information useful. Be sure to check http://DevWebPro.com for some free downloads and more great information. Sincerely, Peter Thiruselvam mailto:Pete@DevWebPro.com Editor ===================================================================== Invite your friends to subscribe to DevWebPro or any of the other newsletters provided by eZined.com, part of the iEntry Network: http://www.eZined.com/ ===================================================================== --- DevWebPro is an eZined.com publication --- http://www.eZined.com http://www.DevWebPro.com