Jump to content

Archived

This topic is now archived and is closed to further replies.

Andrew R

Download System?

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);
?>

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=95433\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=95433[/a]

That should help

Share this post


Link to post
Share on other sites

×

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.