If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Need PHP HELP!!!!

I have a select box that gets filled from a DB query and contains a list of email addresses. I allow the user to multi select email addresses and by way of javascript move the selected email addresses over to another select box.

Now once they have their selected group of email addresses in the second box they hit submit and I process these email addresses. This is what I want.

So how do I access these email addresses on the next page? I need all of the addresses from the second box that they moved over. I am using php on the server side and using the post method on the form. I tried accessing the select list via $HTTP_POST_VARS["editbox"] but it only lists one of the items. I thought that the post vars was setup like an array and I tried to access it like $HTTP_POST_VARS["editbox"][0] but this gave me the first letter of the one email address.

Thank you for the reply. You are the second person to suggest this so I think this is the right path.

My problem is I am not very good with Javascript and when I change my code to have the "[]" after the name I assume I need to do the same where I reference it in my Javascript. Once I do this my what was working JS code to move the items from one list to the other stops working.

Just for the heck of it I will post my code below...if you can (or have time) it would be great if you could point me in a direction as to how this name="editbox[]" effects my Javascript code or additional changes that need to be made so this array will work. The first edit box is populated by a MYSQL query (I spared you the query code, I tried to keep it short) I am excited that I am one step away from this working (it has been a week now). Again thank you for your time.

<!--******irrelevant body info************-->
<table cellpadding=3 cellspacing=5 border=0>
<tr>
<td>
All of the email addresses below have been sent an email
of rejection that they must reply to for proof of legitimacy.
Once they reply they will be added to SpamnIt's Database and
be able to send you email. If you know someone in the list is
legitimate or see a newsgroup/forum address,
<b><a href=../admin/adminwhite.php>Click here</a></b> to add them to your
Whitelist so you can immediately receive email from them.
</td>
</tr>
<tr>
<td>
SpamnIt periodically cleans out these declined emails. If you would like
to clear them sooner, check the <b>delete</b> box and click <b>Submit</b>
to clear all declined email addresses from your list.<p>
</td>
</tr>
</table>

//here we loop through our query results and build the list of
//blocked email addresses and dates they were blocked.
while ($row = @mysql_fetch_array($result))
{
//here we query the declined table inside this loop for each address
//to see if they are still in there meaning they have not
//replied to the email that was sent to them. We do this
//so we can display a different row color to the user to
//show who has replied after being blocked and who has not.
$query = "select UserID from declined where EmailFrom ='".$row[1]."'";