Jump to content

display document based on event


ploppy

Recommended Posts

hi

as a new user of php i am hoping someone can help with a problem i have. i have the following simple tutorial code that i am using and what i would like to achieve is display a document based on a certain date being reached. here is the simple code to work with the db.

 

<?php require_once('Connections/conn.php'); ?>
<?php

$query = "SELECT * FROM boxes WHERE customer = 8"; 
    
$result = mysql_query($query) or die(mysql_error());


while($row = mysql_fetch_array($result)){
   echo $row['intake_date']. " - ". $row['destroy_date'];
   echo "<br />";
}

?>

 

in short, when a user enters a box into the db it creates the intake_date and also creates the destroy_date +6 years. so, if i entered today. the intake date would be 21/05/2010 and the destroy_date would be 21/05/2016. what i am trying to achieve, is once the date reaches the destroy_date a link is created to download a destruction form in the form of a pdf which is already on the server. hope someone can help with this. many thanks

Link to comment
https://forums.phpfreaks.com/topic/202484-display-document-based-on-event/
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.