I can upload, but how do I download a file????

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • toedipper

    I can upload, but how do I download a file????

    Hello,

    The following code grabs the url of a file location on the net from a db
    on my server for a file download.


    // connection to grab url of the file
    mysql_select_db ($database_loca l, $local);
    $query_dllink = sprintf("SELECT dllink FROM software WHERE swid =
    %s",$colname_dl link);
    $dllink = mysql_query($qu ery_dllink, $local) or die(mysql_error ());
    $row_dllink = mysql_fetch_ass oc($dllink);
    $totalRows_dlli nk = mysql_num_rows( $dllink);
    ?>

    So I've gone and grabbed the location.

    I then stick this following bit in between the header sections on my
    html page, note I am trying to kick of the download.

    <? echo "<META HTTP-EQUIV=\"refresh \" CONTENT=\"6;
    URL=http://\"$row_dllin k\" \">"; ?>

    This all work on paper but nothing happens. Basically I want to grab a
    file location url from my db and then start to download that file to the
    user. I am not sure if I am doing this right at all so help would be
    appreciated.

    Any ideas?

    tia.

    td.

  • John Dunlop

    #2
    Re: I can upload, but how do I download a file????

    toedipper wrote:
    [color=blue]
    > <? echo "<META HTTP-EQUIV=\"refresh \" CONTENT=\"6;
    > URL=http://\"$row_dllin k\" \">"; ?>[/color]

    I'd imagine browsers would like what comes after 'URL=' to be
    an address, but you have an extra set of quotes around
    $row_dllink. That's what happens when you complicate things.

    --
    Jock

    Comment

    Working...