Jump to content

ccorlett7

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ccorlett7's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. further to my previous reply, the error displayed in the popup window says it is Line 2 of the PHP script.
  2. I've done load of playing around now trying to get this working but still to no success. I can create a popup using javascript and for it to run the php script, but this displays an error in my php script, evading the 'IF' statements and going straight to the final 'Else' echo statement. Any ideas guys? the code in my PHP script is <?php if ($_FILES["file"]["type"] == "image/jpeg") { if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; } } else { echo "Invalid file. Please select a .JPG file."; } ?>
  3. thanks, ive used the target=_blank. Im now trying to assign the button a javascrip function to run involving myWindow.document.write(PHP SCRIPT.php) Is this possible? So that when clicked the button opens a new window and displays the results from my php file?
  4. cheers, that could be handy but I have it so the file uploads perfectly fine and when 'start; is clicked the php script gets the details. I just want these details displayed on a popup window rather than the web page changing to a blank one. Do I embed a javascript window.open() somehow?
  5. Hi guys, I've created some coding and a button allowing the user to browse their local machine and upload a file, with certain details then displayed on a new web page. Is there a way I can get the ouput to display on a popup window rather than navigate to a new browser page? The code I have used to create this is: <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" /> <input type="submit" name="submit" value="Start" style="height:50px" /> </form> When the user clicks the 'start' button, the php script runs and retrieves the information required but I want this to be output on a popup window. Cheers for your time
×
×
  • 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.