Jump to content

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

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.