[PHP] Popup Window Problems & Refresh
All, I am opening a popup window using the following code: My popup window then runs some PHP code and finally displays a status message with a close window button. When the close window button is clicked I need to close the popup window and refresh the parent window or alternatively (preferably) just recalling the PHP script. Here is the HTML for my popup window: The file [08lg.jpg]Has been Successfully uploaded to the SouthLondonKidz Website The action for the form is only fired if the onClick="window.close() is removed. My question is how can I close the window and refresh or reload the specified window. TIA, Roger
[PHP] Downloading Images
All, I have searched high and low through the lists to find a solution to this problem but none of the suggestions appear to work for me. I have added a download button to a web-site that enables users to download images to their local drives. (I'm using a button as I want to wrap some logic round this function) I have the following (simplified code )that will be called from the web-site when the button is clicked. header("Content-type: application/octet-stream"); header( "Content-Disposition: attachment; filename=01lg.jpg"); $filename= "c:/program files/apache group/apache/kidz/gallery/download/01lg.jpg"; include($filename); The result is the SaveAs box appears and the image is being downloaded with the correct name however when I try and re-open the image i get the message invalid header. Does anyone have any ideas? Vesrions are PHP 3,IE6, Windows ME. Thanks very much in advance, Roger __ Do You Yahoo!? NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Downloading Images
Hi Dave, Thanks for you prompt response. The Image is indeed a different length, (3k as opposed to the original 9k) I originally did have an error message appended to the downloaded image but that no longer appears to be the case. However the image is definitely truncated. Any ideas why this may be happening? Please find attached downloaded image. Thanks, Roger --- David Otton <[EMAIL PROTECTED]> wrote: > On Thu, 4 Oct 2001 07:32:17 -0700 (PDT), you wrote: > > >I have added a download button to a web-site that > >enables users to download images to their local > >drives. (I'm using a button as I want to wrap some > >logic round this function) I have the following > >(simplified code )that will be called from the > >web-site when the button is clicked. > > > >header("Content-type: application/octet-stream"); > >header( "Content-Disposition: attachment; > >filename=01lg.jpg"); > >$filename= "c:/program files/apache > >group/apache/kidz/gallery/download/01lg.jpg"; > > include($filename); > > > >The result is the SaveAs box appears and the image > is > >being downloaded with the correct name however when > I > >try and re-open the image i get the message invalid > >header. Does anyone have any ideas? > > What does the downloaded file look like internally? > Open it in a hex > editor (or even just Notepad). Check the > file-lengths of the original > and copy. My guess is you're saving an error message > with a .jpeg > extension. > > djo > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > __ Do You Yahoo!? NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 <> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Upload File Path Problem
All, I am putting together a simple upload program where an HTML form calls a php script passing a file which is then used to upload. I am running this locally currently, prior to rolling out to a test server. My problem is this. The variable $filename I am passing from the form to the php script is having the path corrupted. In the php script if I echo $filename_name the file name is being passed correctly (test.txt) but when I echo the $filename variable it contains a value of \\php2 when infact the correct value should be c:\test.txt. I include below my sample code. If anyone has any ideas I would be most grateful. Thanks in advance, Roger upload.html == Upload file : Image Description : First Name : Last Name: Location: Dagenham Romford Other Age : Email Address : uploadrjb.php3 == echo "File=" . "$userfile"; echo "File=" . $userfile_name; //echo "Description=" . $description; //echo "Age= " . $age; //echo "First Name = " . $firstname; //echo "Last Name = " . $lastname; //echo "Location = ". $location; //echo "Email = ". $email; if ( isset($userfile) ) { if ( copy("c:\\" . "$userfile_name", "c:\\bollocks.txt") ) { echo("File Successfully copied"); } else { echo("Error: Failed to copy file..."); } } ?> __ Do You Yahoo!? NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]