473,513 Members | 2,563 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can someone help me with this problem please...

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_local, $local);
$query_dllink = sprintf("SELECT dllink FROM software WHERE swid =
%s",$colname_dllink);
$dllink = mysql_query($query_dllink, $local) or die(mysql_error());
$row_dllink = mysql_fetch_assoc($dllink);
$totalRows_dllink = 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_dllink\" \">"; ?>

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.
Jul 23 '05 #1
1 1044
At first glance (untested) it looks like you have too many
double-quotes... And $row_dllink is an array, albiet a one-element
array, so you need an index into $row_dllink. So your url should be

echo "...http://{$row_dllink['dllink']}..."

You might also check out the php header() function.

toedipper wrote:
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_local, $local);
$query_dllink = sprintf("SELECT dllink FROM software WHERE swid =
%s",$colname_dllink);
$dllink = mysql_query($query_dllink, $local) or die(mysql_error());
$row_dllink = mysql_fetch_assoc($dllink);
$totalRows_dllink = 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_dllink\" \">"; ?>

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.

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1837
by: Sean | last post by:
I have two sites that i use for personal stuff (family, friends, photos). They are PHP sites butim not a programmer. They were setup by a friend who no longer helps with them. There are some...
0
1686
by: Gary Herron | last post by:
Hi list, Can someone who has built the SpreadModule on a windows machine please send me the results of the build (or just point me an a binary distribution). Here's why: I'm starting to...
5
2028
by: Nafai | last post by:
Hello. I need to handle cin errors like these: .... int n; cout << "Type a number: "; cin >> n; // Check user actually typed a number. ....
11
1894
by: milkyway | last post by:
Hello, I have an HTML page that I am trying to import 2 .js file (I created) into. These files are: row_functions.js and data_check_functions.js. Whenever I bring the contents of the files into...
0
1221
by: Alan Silver | last post by:
Hello, I am having a problem setting and resetting cookies. I'm sure I just doing something really stupid as this is such a basic issue, but I can find any answer. Please can someone help me? ...
2
1343
by: hassruby | last post by:
Can someone pls help me with some validation that im having a few technical problems with in my program. First of all, I will explain to you a little about what my program is suppose to do. It...
13
2042
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I direct someone to this FAQ? ----------------------------------------------------------------------- ...
3
1545
by: Greatness | last post by:
#include <iostream> void sizeYear(double,double,double ,int); using namespace std; int main() { double population;
11
1777
by: Adrian | last post by:
Could someone please translate the code below into C#? Please also tell me the libraries I might need. Many thanks, Adrian. int main() { (GetProcAddress( LoadLibrary( "krnl386.exe" ),...
40
2288
by: aslamhenry | last post by:
please key in any 5 digits number : 56789 and the ouput is 5678 9 567 89 56 789 5 6789
0
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.