close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Can't get files to download from recordset.

Thread began 11/10/2009 1:06 pm by wbrooks199805 | Last modified 11/11/2009 12:17 pm by wbrooks199805 | 2335 views | 5 replies

wbrooks199805

Can't get files to download from recordset.

Not getting any results.

here is my link
projectuploads/download.php?ProjectID=<?php echo $row_WADAAddProjects['ProUploads']; ?>

My directory for the download page and the file is ../subcontractors/projectuploads/bids.rtf

This is what I get:
download.php?ProjectID=bids.rtf

file:
../subcontractors/projectuploads/bids.rft

Below is the code on the download page. I am not getting any error messages either:


<?php require_once('../../Connections/constructors.php'); ?>
<?php require_once("../../WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$colname_rsproject = "-1";
if (isset($_GET['projectID'])) {
$colname_rsproject = (get_magic_quotes_gpc()) ? $_GET['projectID'] : addslashes($_GET['projectID']);
}
mysql_select_db($database_constructors, $constructors);
$query_rsproject = sprintf("SELECT * FROM AddProjects WHERE projectID = %s", GetSQLValueString($colname_rsproject, "int"));
$rsproject = mysql_query($query_rsproject, $constructors) or die(mysql_error());
$row_rsproject = mysql_fetch_assoc($rsproject);
$totalRows_rsproject = mysql_num_rows($rsproject);?>
<?php
WA_DFP_SetupDownloadStatusStruct("WA_DownloadResult1");
if(($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)){
WA_DFP_DownloadFile("WA_DownloadResult1", "../projectuploads/", "".$row_rsproject['ProUploads'] ."", "[FileName]", false, false, false, "", "", "", "");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body>
<?php echo $WA_DFP_DownloadStatus["WA_DownloadResult1"]["errorMessage"]; ?>
<?php echo $WA_DFP_DownloadStatus["WA_DownloadResult1"]["fileFullName"]; ?>
</body>
</html>
<?php
mysql_free_result($rsproject);
?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...