MichaelMackey Posted June 24, 2008 Share Posted June 24, 2008 I've been using an export that works great with firefox, but IE exports all of the data to a single page. Would anyone be able to help me out with why IE doesn't like it? This is my code for it: if (isset($_SESSION['searchData']) AND isset($_SESSION['searchFields']) AND $valid == 1) { header("Content-Disposition: attachment; filename=branch.csv"); $errorList = array(); if (sizeof($errorList) == 0) { echo $_SESSION['searchTitle']."\n\n"; echo $_SESSION['searchFields']; echo ("\n\n"); //START FILLING IN THE ROWS IN EXCEL SHEET. $sql = $_SESSION['searchData']; $getInfo = mysql_query($sql); while($row = mysql_fetch_array($getInfo, MYSQL_ASSOC)) { while (list($key, $value) = each($row)) { //If a row needs to have it's value changed before going into the cls file, perform it here using it's sql name if($key == 'registration'){if($value == 1) $value = 'Yes'; else $value = 'No';} if($key == 'training'){if($value == 1) $value = 'Yes'; else $value = 'No';} if($key == 'language'){if($value == 'e') $value = 'English'; else $value = 'French';} if($key == 'photograph'){if($value == 1) $value = 'Yes'; else $value = 'No';} echo ("$value" . ","); } echo ("\n"); } mysql_close($conn); } else { listErrors(); } } Thanks Quote Link to comment https://forums.phpfreaks.com/topic/111694-solved-export-csv-and-internet-explorer/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.