General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 24th, 2003, 07:04 PM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
download link

anyone know how to make a download link to something youve uploaded...ive seen the tutorial but lost the link to it i think its on this site but im not sure...basically i made an upload form and just want to have a link be created from the file that i uploaded so users can download it

Reply With Quote
  #2  
Old July 24th, 2003, 09:52 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
All you need to do is grab the location to where the file is being stored (based on your upload script) and then insert the link using that location:

$link = "file_location";
echo("<a href='$link'>Image</a>");

HTH!
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #3  
Old July 24th, 2003, 10:10 PM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
k thanks but suppose i upload more than one thing will it change with the post or will that link always go with the most current upload

Reply With Quote
  #4  
Old July 24th, 2003, 10:20 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
If you upload more than one file on a single post, you can use an array to store the filenames, and then loop through the array to create your links.

Are you posting the links to a file or a DB?

Reply With Quote
  #5  
Old July 24th, 2003, 11:29 PM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
at the moment to a file...but its not news its like a movie page where i want users from my site to upload demos and stuff and others to download them..

Reply With Quote
  #6  
Old August 2nd, 2003, 03:05 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
So you're posting the download links to a file?

All you need to do is loop through the file (making sure that you use your delimiter to inducate the next iteration (cycle) of your loop) and then create each download link from the links posted in the file.

Let me know if you need any more clarification.

Reply With Quote
  #7  
Old August 3rd, 2003, 12:52 AM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
i got an sql dbase now ...and you lost me

Reply With Quote
  #8  
Old August 3rd, 2003, 10:23 AM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Hehe... Okay, if I understand you correctly, you want to display all the links that have been stored (either in a file or in your new DB) as clickable links on your page.

Do something like this:

PHP Code:
 $sql "SELECT * FROM links";
$result = @mysql_query($sql) or die("Error: " mysql_error());
while (
$row mysql_fetch_obj($result)){
   echo(
"Link: <a href=\"" $row->link "\">" $row->link_desc "</a>";



This is assuming you have a table with the name of "links" with fields named "link" and "link_desc".

Does this give you an idea of how to do it?

Reply With Quote
  #9  
Old August 3rd, 2003, 04:18 PM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
a bit...but the only other way i know how to add data to the sql is with the Blobbing to Mysql tutorial...which by the way is a great tutorial...but i can not add anything else besides description...like author and etc

Reply With Quote
  #10  
Old August 3rd, 2003, 07:51 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Are you familiar with adding text to the database?

You need to create a table of type VARCHAR, which will store up to 255 characters in the field. This would be ideal to store your upload descriptions.

How many elements do you want to add to your table? When the user is presented with the upload form, how many fields do they need to enter information into?

Can you post your form code.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > download link


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT