Uploading Files with PHP

Very often you will want users to able to upload files to your server. This is easily accomplished using a smattering of PHP code. File Upload Form The following is an example file upload form. <form enctype="multipart/form-data" action="upload.php" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a file to upload: <input name="userfile" t...

Posted in PHP at 2005-09-26T20:58:55Z.

Emailing Forms with PHP

So, you want a nice little feedback form on your Web site. The user clicks the submit button, and the feedback makes its happy way to your email address. Let's look at how this is done in PHP. Example PHP Code Here's some example PHP code to start us off: <html> <head><title>Feedback</title></head> <body> <?php // Handle POST method. ...

Posted in PHP at 2005-09-26T21:01:06Z.

Configuring PHP

I would recommend getting Apache to use as a Web server when running PHP. However you can use a range of different Web servers, please read the installation instructions at the official PHP site. To configure Apache you need to edit the srm.conf or your httpd.conf to make Apache work with the PHP binary. Windows 9x/2k/NT Here you will need to add the following directives: ScriptAlias /php/ "c:...

Posted in PHP at 2005-11-17T20:50:34Z.