Jump to content

Recommended Posts

it was working before, but now for some reason this script is not adding the spaces in the file name when you click the download link... heres the script:

 

		// this variable has an if statement built in. (If Key is not found, set keyword to tax, otherwise set to keyword given.
	$Keyword1 = (isset($_GET['Key']))? mysql_escape_string($_GET['Key']) : "Tax";
	$query  = "SELECT * FROM files WHERE Keyword1 = '$Keyword1' OR Keyword2 = '$Keyword1'";
	$result = mysql_query($query);

	while($row = mysql_fetch_array($result, MYSQL_ASSOC))
	{
echo 	"<span class='titlebar3'>File Name:</span>    <span class='titlebar3'><a href='index2.php?id={$row['id']}'>{$row['Filename']}</a></span> <br>" .
	"<span class='titlebar2'>Keywords:</span> <span class='description'>{$row['Keyword1']}, {$row['Keyword2']}</span> <br>" .
	"<span class='titlebar2'>Description:</span> <span class='description'>{$row['Description']}</span> <br>" .
	"<span class='titlebar2'>Date Added:</span> <span class='description'>{$row['DateAdded']}</span> <br><br>";
	}
	include 'libs/dbclose.php';
	?>

 

Say i try and download "Equipment Log.xls" it downloads "Equipment" but if i try "notes.txt" it will download "notes.txt"

 

any ideas?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.