Re: [PHP-DB] Need Help with PHP Mails

2011-04-04 Thread Will Lunden
Hi Guru,

Have you already made the php script that includes the mail function? If
there is an error in your php that is preventing the mail function from
working properly, I or someone else may be able to help you correct it if
you were to send the php you have written so far.

-Will
2011/4/4 Guru™ nagendra802...@gmail.com

 Hi All,

 I have this HTML form


 style type=text/css
 !--
 .style14 {font-size: 24px
 }
 .style14 {font-size: 12px}
 --
 /style
 table width=788 border=0 align=center
  tr
td width=1023form method=post action=
  table width=648 height=133 border=0 align=center
 cellpadding=0 cellspacing=0 bordercolor=#00
tr
  td width=132 height=44 valign=middlediv
 align=rightstrongYour Name/strong/div/td
  td width=491 valign=middleinput name=party_name
 type=text size=50 //td
/tr
tr
  td valign=middlediv align=rightstrongContact
 Numbers/strong/div/td
  td height=38 valign=middlep align=left
input name=contact_nos type=text size=50 /
span class=style14(please specify STD code)/span/p/td
/tr
tr
  td valign=middlediv
 align=rightstrongEmail/strongstrong /strong/div/td
  td height=33 valign=middleinput name=email type=text
 size=50 //td
/tr
  /table
  p align=center
input type=submit value=submit name=submit
  /p
/form/td
  /tr
 /table




 

 What I want is when the user click on the submit button the data from this
 form should directly comes to my email. I tried mail function but not
 working for me. I just need these 3 fields in my mail. Please help me with
 this.

 --
 *Best,
 *
 *Guru™*



Re: [PHP-DB] Need Help with PHP Mails

2011-04-04 Thread Guru™
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 = nagendra802...@gmail.com;


 if(mail($mymail, New contact info submitted!,Party: {$party_name}
Contact:  {$contact_no}Email: {$pemail}))
  {


 echo 'Mail sent!br /';
  }
  }





?


Re: [PHP-DB] Need Help with PHP Mails

2011-04-04 Thread Will Lunden


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™ nagendra802...@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 = nagendra802...@gmail.com;


 if(mail($mymail, New contact info submitted!,Party:  
{$party_name}  Contact:  {$contact_no}Email: {$pemail}))

  {


 echo 'Mail sent!br /';
  }
  }





?