|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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
|
|
#4
|
|||
|
|||
|
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? |
|
#5
|
|||
|
|||
|
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..
|
|
#6
|
|||
|
|||
|
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. |
|
#7
|
|||
|
|||
|
i got an sql dbase now ...and you lost me
|
|
#8
|
|||
|
|||
|
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:
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? |
|
#9
|
|||
|
|||
|
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
|
|
#10
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > download link |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|