Re: Need Help with PHP Mails
| From: | Will Lunden | Date: | Mon, 04 Apr 2011 17:31:30 +0000 |
| Subject: | Re: Need Help with PHP Mails | ||
| References: | 1 2 3 | Groups: | php.db php.windows |
| Request: | Send a blank email to php-windows+get-30593@lists.php.net to get a copy of this message | ||
Hi Guru,
Glad to hear it's working! Yes the mail function will be able to handle all the fields, it should be as simple as repeating what you've already done for all of the remaining fields
- Will
On Apr 4, 2011, at 1:09 PM, Guru™ <nagendra802000@gmail.com> wrote:
Hi Will, Below is my final PHP code, and its working now. However this is just a small piece of the form that I have created. In my original form I have more then 50 fields and variables. Now I am not sure how to expand this code having all 50 fields. Can the mail function will take that much fields? <?php if(isset($_POST['submit'])) // submit button clicked { $party_name = isset($_POST['party_name'])? $_POST['party_name']:null; $contact_no = isset($_POST['contact_no'])? $_POST['contact_no']:null; $pemail = isset($_POST['pemail'])? $_POST['pemail']:null; $mymail = "nagendra802000@gmail.com"; if(mail($mymail, "New contact info submitted!","Party:{$party_name} Contact: {$contact_no} Email: {$pemail}")) {echo 'Mail sent!<br />';}} ?>