%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php include("secure/db_config.php"); $query = mysqli_query($connection,"SELECT * FROM `tbl_nextstartup_business` ORDER BY bid DESC"); $numbs = mysqli_num_rows($query); if($numbs > 0){ $delimiter = ","; $filename = "Next-Startup-Form_" . date('Y-m-d') . ".csv"; //create a file pointer $f = fopen('php://memory', 'w'); //set column headers $fields = array("Business Plan Name","Student Name","School Name","Email","School Address","Street","District/City","State","Pin Code","Mobile","12-pass-year","Subject Specialisation","Other Member","Category Business","Explain Product","Pitch-Business","Current-date"); fputcsv($f, $fields, $delimiter); //output each row of the data, format line as csv and write to file pointer while($row = mysqli_fetch_assoc($query)){ // $status = ($row['status'] == '1')?'Active':'Inactive'; $lineData = array($row['business_plan_name'], $row['student_name'], $row['school_name'],$row['student_email'], $row['school_address'], $row['street'],$row['district_city'],$row['state'],$row['pin_code'],$row['student_mobile'], $row['12_pass_year'],$row['sub_specialisation'],$row['other_member'],$row['category_business'],$row['explain_product'],$row['pitch_your_business'],$row['c_date']); fputcsv($f, $lineData, $delimiter); } //move back to beginning of file fseek($f, 0); //set headers to download file rather than displayed header('Content-Type: text/csv'); header('Content-Disposition: attachment; filename="' . $filename . '";'); //output all remaining data on a file pointer fpassthru($f); } exit; ?>