Not able to download longblob data using header function — contact form 7
-
Not able to download longblob data using header function. Its downloading only csv file for other file its showing corrupted .My code is below .
$sql_checkqury = "SELECT DATE_FORMAT(FROM_UNIXTIME(submit_time), '%b %e, %Y %l:%i %p') AS 'Submitted', form_name,file As file2, max(if(<code>field_name</code>='Name', <code>field_value</code>, null )) AS 'name', max(if(<code>field_name</code>='Email', <code>field_value</code>, null )) AS 'email', max(if(<code>field_name</code>='Phone', <code>field_value</code>, null )) AS 'phone', max(if(<code>field_name</code>='Upload CV', <code>field_value</code>, null )) AS 'cv', max(if(<code>field_name</code>='Submitted From', <code>field_value</code>, null )) AS 'submitted_from', max(if(<code>field_name</code>='Cover Letter', <code>field_value</code>, null )) AS 'cvletter', GROUP_CONCAT(if(<code>file</code> is null or length(<code>file</code>) = 0, null, <code>file</code>)) AS 'fields_with_file' FROM <code>wp_cf7dbplugin_submits</code> WHERE <code>form_name</code>='".$enquiryform."' and submit_time=$enquiryid"; $result = mysql_query($sql_checkqury); header('Content-Description: File Transfer'); header('Content-Type:'.$mime); header('Content-Disposition: attachment; filename='.$cv); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' .strlen($row['fields_with_file']));
- The topic ‘Not able to download longblob data using header function — contact form 7’ is closed to new replies.