Jump to content


Photo

Download System?


  • Please log in to reply
4 replies to this topic

#1 Andrew R

Andrew R
  • Members
  • PipPipPip
  • Advanced Member
  • 158 posts
  • LocationIreland

Posted 24 June 2006 - 12:17 PM

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


#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 24 June 2006 - 12:25 PM

"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.
Legend has it that reading the manual never killed anyone.
My site

#3 Andrew R

Andrew R
  • Members
  • PipPipPip
  • Advanced Member
  • 158 posts
  • LocationIreland

Posted 24 June 2006 - 12:34 PM

[!--quoteo(post=387426:date=Jun 24 2006, 01:25 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Jun 24 2006, 01:25 PM) View Post[/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


#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 24 June 2006 - 12:43 PM

[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
Legend has it that reading the manual never killed anyone.
My site

#5 Andrew R

Andrew R
  • Members
  • PipPipPip
  • Advanced Member
  • 158 posts
  • LocationIreland

Posted 24 June 2006 - 12:53 PM

Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users