one more question

I’m in the home stretch on this thing. The last part of this is 2 fold.

1 - I have to export this data to an xls file. I have the code to actually write the file, just have to find a way to execute it from jquery. So far, all I’ve been able to do is get to show up in a div.
function for that is [code]function export_xls() {
var info = $("#paid").val();

$.ajax({
	url: "inc/export_hitlist.php",
	data: {paid: info},
	type: 'post',
	dataType: 'json',
	
	success: function(data) {
		$("#invisible").html(data);
	}

});
}[/code]
2 - send out an email with the xls file as an attachment, for which I have no code yet to do it.

The third example down on this page shows you how to do the attachments in email with php…

http://webcheatsheet.com/php/send_email_text_html_attachment.php

I use that site too, good examples. I just hadn’t gotten that far yet, that’s why i didn’t have any code for it yet. Still stuck on how to get jquery to return the file instead of the file contents. I think i might have to switch to just php on that part.

I finally managed to get this working, fricken nightmare. Ended up having to scrap the library I was using and went with phpexcel. not really easier to use, but it allows me to use a template and save it to the server and (with some other code) email it out.

Sponsor our Newsletter | Privacy Policy | Terms of Service