Can’t export mysql table via js script

Home / Uncategorized / Can’t export mysql table via js script

Question:
I can export html table but cant export php table via js. When pressing button it starts download clean excel file(should be table "sanoat").Whats my problem ? Sorry im newbie. Maybe there is another way to do it ? I know PHPExcel method to get from mysql into excel , but it saves excel in server directory. I need button where you press and it ask where to save excel file with all your table in it.












$(document).ready(function(e) { $(‘#excel’).click(function(e) { $(‘sanoat’).tableExport({ type: ‘excel’, escape: ‘false’ }); }); });
";
$result=mysql_query("SELECT id,name,bank FROM sanoat ORDER BY id");
$n=mysql_num_rows($result);
echo "

";
for($i=0;$i<$n;$i++) echo "

";
echo ""
?>

ID name bank
",mysql_result($result,$i,id),
"
",mysql_result($result,$i,name),
"
",mysql_result($result,$i,bank),
"



Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *