Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.