Jump to content

Download System?


Andrew R

Recommended Posts

Hello

I am creating a simple download system that will pull a link from the database and open it up. The problem is I don’t seem to be able to open the link of the file up when I click index.php?view=download&DLID=1. Any advice on how to open up a link in a database?

<?
include 'db.php';

$query_downloads = "SELECT file FROM downloads where DLID = '$DLID'";
$downloads = mysql_query($query_downloads) or die(mysql_error());
$row_downloads = mysql_fetch_assoc($downloads);
?>
Link to comment
Share on other sites

"Open up a link in a database" - doesn't make sense to me.

My guess is that what you want is to abstract a URL from yoiur database and display a clickable link for the visitor. Then again, maybe you want to force a download dialog box to open. Tell us what you mean and that'll help.
Link to comment
Share on other sites

[!--quoteo(post=387426:date=Jun 24 2006, 01:25 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Jun 24 2006, 01:25 PM) [snapback]387426[/snapback][/div][div class=\'quotemain\'][!--quotec--]
"Open up a link in a database" - doesn't make sense to me.

My guess is that what you want is to abstract a URL from yoiur database and display a clickable link for the visitor. Then again, maybe you want to force a download dialog box to open. Tell us what you mean and that'll help.
[/quote]

Yes in the database I have a link to the file (below), when index.php?view=download&DLID=1 is clicked I want the that URL to open and force a download dialog box.

[a href=\"http://imageshack.us\" target=\"_blank\"][img src=\"http://img93.imageshack.us/img93/238/12hk2.jpg\" border=\"0\" alt=\"IPB Image\" /][/a]

Cheers
Andrew
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.