Re: How do they do this?
| From: | Heilig Cece Szabolcs,,, | Date: | Mon, 23 Oct 2000 15:49:41 +0000 |
| Subject: | Re: How do they do this? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21794@lists.php.net to get a copy of this message | ||
Hi!
I think i understood your question... :)
I have some html code that is a list of newsletters that was given to me by an affiliate. When submitted, this goes to a php page. Can someone tell me how this page gets all of the values that are checked? I thought that it was handling it all in an array, but I have been unable to verify this.PHP gets only the last value in that case, but: use 'name=listname[]' against 'name=listname' and then you have an array... On server side: while ($maillist = next($listname) { maillist_subscribe($maillist) ; // :) } BUT: If the subscribe html page is not yours, you can harvest datas from $QUERY_STRING with $dataz = explode("&",$QUERY_STRING)... while ($row = next($dataz)) { list($key,value) = split("=",$row,2) ; if ($key == "listname") { maillist_subscribe($value) ; } } Sources are untested, and maillist_subscribe() is an alias to mail(blahblah...).
<BR><INPUT type=checkbox name=listname value="fabfree/Recipes.list">Recipes <BR><INPUT type=checkbox name=listname value="fabfree/HUMOR.list">Humor <BR><INPUT type=checkbox name=listname value="fabfree/beauty.list">Beauty <BR><INPUT type=checkbox name=listname value="fabfree/gambling_and_lotteries.list">Lotteries <BR><INPUT type=checkbox name=listname value="fabfree/Contests.list">Contests <BR><INPUT type=checkbox name=listname value="fabfree/Gambling.list">Gambling <BR><INPUT type=checkbox name=listname value="fabfree/Computer_Software-Educational.list">Software-EducationalCece