Jump to content

New guy with an exporting question (sort of)


weemikey

Recommended Posts

Hi all! I've been using this site as a reference while building my first-ever php/mysql site. I know database concepts fairly well, but php is new to me so I'm going in blind. I'm making a contact manager and the client wants to be able to use checkboxes to select email addresses on MULTIPLE pages within the system, then have them output somewhere locally as a CSV list.

 

I can get a single page to at least store the selected addresses in a variable, but I don't know what path to take in terms of storing and concatenating addresses from different pages.

 

I've tried a temp table, but I never even got the syntax for creating it correctly. I thought cookies would be the answer, but I get all kinds of "header can't be sent" errors. I now understand that there are places where you can set cookies and places you can't.

 

In the interest of full disclosure, I'm basing my system on one I found in a book. Each page is a php file that creates a big text variable of html mixed with the dynamic stuff, then at the end I just echo the giant variable. I see lots of different approaches to programming this stuff, so I hope I'm not stuck in 1978 with this method.

 

All I'm looking for is the direction an experienced programmer might take. Just pseudo code or something like it. Any thoughts are much appreciated.

 

Thanks! weemikey

You can use output buffering to set a cookie from within any part of the script. Personally, I would use a mix of javascript and cookies to store the information to the cookie as soon as the checkbox is checked. when the user is done checking what they need, all the information is already stored in the variable

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.