professional-sql-02-public-files-upload-avatar.php / php
<?php // include shared code include '../lib/common.php'; include '../lib/db.php'; include '../lib/functions.php'; include '../lib/User.php'; include '../lib/JpegThumbnail.php'; include '401.php'; _SESSION['userId']); ?> <form action="<?php echo htmlspecialchars(<div> <input type="file" name="avatar"/> <input type="submit" value="upload"/> </div> </form> <?php if (!_FILES['avatar']['error']) { // create a thumbnail copy of the image img->generate(user->username . '.jpg'); } ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.