showing submitted images

From: Date: Sun, 19 Aug 2001 22:24:22 +0000
Subject: showing submitted images
Groups: php.general 
Request: Send a blank email to php-general+get-63430@lists.php.net to get a copy of this message
Please help, I'm trying to submit a .jpg image via a html form and showing it with the following piece of code <?php if ($submit) { header("Content-type: $form_data_type"); $data = fread(fopen($form_data, "r"), filesize($form_data)); echo $data; } else { ?> <form method="post" action="<?php echo $PHP_SELF ?>" enctype="multipart/form-data"> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000"> <br>File to show:<br> <input type="file" name="form_data" size="40"> <p><input type="submit" name="submit" value="submit"> </form> <?php } ?> but I only get the binary contents of the .jpg file. What's wrong? My hostmaster has an infobar running at the top of my page [check www.oss-fodbold.dk to see what I mean]. Is this the problem? Thanks in advance Simon

« previous php.general (#63430) next »