Hi here, I am sending a file to user's browser and logging the downloaded file into MySQL but everytime this script works, I see double entry in the MySQL table... Why is this happening?
Any ideas? Thanks <? $today = date("Y-m-d"); $conn = db_connect(); if(!$conn) echo "Can't connect to database..."; $query = "INSERT INTO track_dl (dldate, email, file) VALUES ('$today', '[EMAIL PROTECTED]', 'file.ext')"; $result = mysql_query($query); if(!$result) echo "Can't execute query: " . mysql_error(); header("Content-type: application/pdf"); readfile("file.pdf"); exit(); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php