By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,805 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,805 IT Pros & Developers. It's quick & easy.

Passing values to PHP script via check boxes.

P: 1
Looking for some help with an email form using php.

I am using check boxes in a html form, the values of check boxes are email addresses.
The person visiting our site has the ability to select one or more check boxes.
The values (email addresses) need to be passed on to the php script which in return sends mails to each of the selected emails. (selected addresses only)
The script should also send an email to myself!

Your help.... would be much appreciated, I am an absolute PHP beginner!!

Kia Ora from NZ
Jun 12 '07 #1
Share this Question
Share on Google+
4 Replies


ak1dnar
Expert 100+
P: 1,584
Looking for some help with an email form using php.

I am using check boxes in a html form, the values of check boxes are email addresses.
The person visiting our site has the ability to select one or more check boxes.
The values (email addresses) need to be passed on to the php script which in return sends mails to each of the selected emails. (selected addresses only)
The script should also send an email to myself!

Your help.... would be much appreciated, I am an absolute PHP beginner!!

Kia Ora from NZ
Hi Kia Ora,
Welcome to TSDN!

Please submit the HTML form and php mail script(if any).
Jun 13 '07 #2

Motoma
Expert 2.5K+
P: 3,235
Have you taken a look at the mail() function? Have you written any code to try this?

Please post what you have already (even if it isn't much) and we will do our best to give you guidance.
Jun 13 '07 #3

nathj
Expert 100+
P: 938
My first thought, based on limited information is that you can set the value of the check box so that when it is clicked the value you read out is the email address you are after.
For example
[HTML]<input type="checkbox" name="email1" value="email1@domain.com" checked> email1@domain.com[/HTML]

This can then be read using php in the form destination (as stated uder action="":
[PHP]
$_REQUEST['email1']
[/PHP]

Based on the info you gave I think this might help you out. If not post some code or let us know how you resolved the problem

Nathan
Jun 14 '07 #4

pbmods
Expert 5K+
P: 5,821
Changed thread title to better describe the problem.
Jun 14 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.