Current location: Hot Scripts Forums » Programming Languages » PHP » Opening new window


Opening new window

Reply
  #1 (permalink)  
Old 10-20-05, 06:59 PM
janims janims is offline
New Member
 
Join Date: Nov 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Opening new window

Hello,

What I need:

by clicking on the link to my php file (for example download_tutorials.php) a new window will appear with an url address to my tutorials.zip file (the url has to appear in the Internet explorer "Address" bar! Something like "http:www.htmltutorials.net/tutorials.zip").

Once again:
Let's say by clicking on download_tutorials.php (actually opening it) I will see a new window "http:www.htmltutorials/tutorials.zip" + actually another download window will pop up as well ("Save as").

I've tried to use a simple code with "header redirection" (found on Google) it opens a new window but there is no "http:www.htmltutorials.net/tutorials.zip" url in the Interent explorer's Address bar.

Any help appreciated.
Thanks.
Reply With Quote
  #2 (permalink)  
Old 10-21-05, 04:39 AM
olaf's Avatar
olaf olaf is offline
Newbie Coder
 
Join Date: Sep 2004
Location: The Netherlands
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
check my download snippet:
http://www.finalwebsites.com/snippets.php?id=4

If you download a class from my site you see this kind of code in action.
Reply With Quote
  #3 (permalink)  
Old 10-22-05, 01:58 AM
janims janims is offline
New Member
 
Join Date: Nov 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks, looks like that's the code I need. My apologies, I am newbie here, and somehow cannot make anything out of the code. Could you send me or PM an example with real values?

Like in this line:
$fullPath = $path.$_GET['downnload_file'];

I really do not know what to enter instead of 'download_file'.. (probably the name of the file I want to download?)

Thanx
Reply With Quote
  #4 (permalink)  
Old 10-22-05, 02:20 AM
olaf's Avatar
olaf olaf is offline
Newbie Coder
 
Join Date: Sep 2004
Location: The Netherlands
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
On my site the filenames are from a database.
but you can use like this

call the download script like download.php?download_file=example.zip

inside the download script you need to define the path where the files are stored ($path)
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening new window in Javascript NetSavage JavaScript 3 03-29-05 11:49 PM
Modal Window over a modal window goog JavaScript 1 01-29-05 11:58 AM
[Help] Javascript pop up window with background color empty.container JavaScript 1 01-13-05 03:11 AM
Help! ace-teck JavaScript 1 10-15-04 09:17 AM
how to set minimal dimensions for a modal window jasongr JavaScript 1 09-29-04 03:25 AM


All times are GMT -5. The time now is 06:17 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.