Jump to content

automatically download documents onload


r-it

Recommended Posts

i have another problem with regards to documents. The thing is, when a user registers, they upload a document right, and we store the document's link and the date it was loaded on the database, but now i would like this to happen, that when i log in and there has been a dcument uploaded, it takes the date now and compares it with the date that the document was loaded, like this:

 

<?php
$time = time();
$dt = date("Y-m-d h:i:s", $time);

$sql99 = "SELECT docLink FROM documents WHERE docDate <= '$dt'";
$99_res = mysql_query($sql99, $conn);
if(mysql_num_rows($99_res) > 0)
{
while($z = mysql_fetch_array($99_res))
{
	$link = $z['docLink'];

	$loc = "<a href=\"$link\" target=\"_blank\">";
}
}

?>

but the problem is that i want that open/save/cancel dialog to appear for each new record that was added, can someone help, or am i not clear enough?

Thanx

Link to comment
https://forums.phpfreaks.com/topic/50481-automatically-download-documents-onload/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.