Jump to content

Display Image On Cue HELP Please!!!


JustinMs66@hotmail.com

Recommended Posts

ok. for my uploads website, i want it to be so that when you click "Upload", "test.gif" appears until the upload is complete.
please help!

here is my current PHP code:
(everything is in index.php)
[code]<html><form method='post' action='' enctype='multipart/form-data'>
  <p align="center">
    <input name="MAX_FILE_SIZE" value="999999999999" type="hidden">
      Choose a file to upload
      <input name="uploadedfile" type="file">
      <input name="submit" type="submit" value="Upload"></p>

<?php
$bad_types = array('application/x-php');
if( in_array( $_FILES['uploadedfile']['type'], $bad_types ) )
{
    echo "That File type is not supported.";
}
else
{
$target_path = "uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);

    if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
        echo "The file ".  basename( $_FILES['uploadedfile']['name']).
        " has been uploaded. here is the link to your file: <a href='uploads/".  basename( $_FILES['uploadedfile']['name']). "'>".  basename( $_FILES['uploadedfile']['name'])."</a><br>";
    } else{
        echo "Error!";
    }
}
?>
</body> </html>[/code]
Link to comment
https://forums.phpfreaks.com/topic/27654-display-image-on-cue-help-please/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.