Below is the text of the page https://ua.php.net/tut.php stored 2006-11-23 by archive.org.ua. The original page over time could change. View as original html

PHP: A simple tutorial - Manual

[/] downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net s earch for in the function list all php.net sites this mirror only online documentation bug database Site News Archive All Changelogs just pear.php.net just pecl.php.net just talks.php.net general mailing list developer mailing list documentation mailing list PHP Manual Getting Started Introduction A simple tutorial Your first PHP-enabled page What can PHP do? Last updated: Thu, 28 Sep 2006 view this page in Brazilian Portuguese Chinese (Simplified) Chinese (Hong Kong Cantonese) Chinese (Traditional) Czech Danish Dutch Finnish French German Greek Hebrew Hungarian Italian Japanese Korean Polish Romanian Russian Slovak Spanish Swedish Chapter 2. A simple tutorial Table of Contents What do I need? Your first PHP-enabled page Something Useful Dealing with Forms Using old code with new versions of PHP What's next? Here we would like to show the very basics of PHP in a short, simple tutorial. This text only deals with dynamic webpage creation with PHP, though PHP is not only capable of creating webpages. See the section titled What can PHP do for more information. PHP-enabled web pages are treated just like regular HTML pages and you can create and edit them the same way you normally create regular HTML pages. What do I need? In this tutorial we assume that your server has activated support for PHP and that all files ending in .php are handled by PHP. On most servers, this is the default extension for PHP files, but ask your server administrator to be sure. If your server supports PHP, then you do not need to do anything. Just create your .php files, put them in your web directory and the server will automatically parse them for you. There is no need to compile anything nor do you need to install any extra tools. Think of these PHP-enabled files as simple HTML files with a whole new family of magical tags that let you do all sorts of things. Most web hosts offer PHP support, but if your host does not, consider reading the PHP Links section for resources on finding PHP enabled web hosts. Let us say you want to save precious bandwidth and develop locally. In this case, you will want to install a web server, such as Apache , and of course PHP . You will most likely want to install a database as well, such as MySQL . You can either install these individually or choose a simpler way. Our manual has installation instructions for PHP (assuming you already have some webserver set up). In case you have problems with installing PHP yourself, we would suggest you ask your questions on our installation mailing list . If you choose to go on the simpler route, then locate a pre-configured package for your operating system, which automatically installs all of these with just a few mouse clicks. It is easy to setup a web server with PHP support on any operating system, including MacOSX, Linux and Windows. On Linux, you may find rpmfind and PBone helpful for locating RPMs. You may also want to visit apt-get to find packages for Debian. add a note User Contributed Notes A simple tutorial Seth Illgard 19-Nov-2006 10:08 I recomend XAMPP, works great! I tred it on weindows and Mac OS X systems and works great. Check the web at www.apachefriends.org Cheers! Bevan 18-Nov-2006 12:01 MAMP is a great alternative for Mac OS X. xampp-MacOSX development stalled in 2005 when the developer's mac broke. (I think he has got a new one already, but has still not yet re-released xampp-MacOSX) cvncpu 25-Oct-2006 09:53 just keep in mind that these installation packages are for development use, and are not built for a production enviroment, the preformance and security of these tools is not setup for use in a public website. Debi 25-Oct-2006 02:25 XAMPP is a useful package that includes things like Apache, MySQL, PHP, Perl, etc. and you can get it for Linux, Windows, Mac OS X, and Solaris and it's free. I just started using it and it's working fine so far. http://www.apachefriends.org/en/xampp.html shubho dot ghosh at gmail dot com 23-Oct-2006 12:33 Alternatively, you can also download the WAMP server from http://www.wampserver.com This will allow you to install Apache, PHP and MySQL with windows based installation! Cheers! add a note Your first PHP-enabled page What can PHP do? Last updated: Thu, 28 Sep 2006 show source | credits | sitemap | contact | advertising | mirror sites Copyright © 2001-2006 The PHP Group All rights reserved. This unofficial mirror is operated at: http://php.paco.net/ Last updated: Wed Nov 22 05:27:04 2006 EET