naveenbj Posted January 8, 2008 Share Posted January 8, 2008 Hello How are you all?? I have a small php enabled form and i want this form to send the info(whtever the user entered)in my mail and as well as in the next page . Here is the Link for my form>>http://ice.host-care.com/~com/n/form.html here im able to show the info. in next page but not in my email. So if anyone can help me it will be highly appriciated. Thanks!! Nj Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/ Share on other sites More sharing options...
chronister Posted January 8, 2008 Share Posted January 8, 2008 So if I understand you correctly you can show data in the page, but your email script is not working... right?? If this is the case please post your email script code. Otherwise please clarify. Thanks, Nate Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433361 Share on other sites More sharing options...
naveenbj Posted January 8, 2008 Author Share Posted January 8, 2008 Hello yaa you got the right point but i for the email point im not able to find out the script . i mean which script is correct to send a mail with info.and that should be work for both(mail and data displaying). Anyways which script you want to see?? Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433363 Share on other sites More sharing options...
naveenbj Posted January 8, 2008 Author Share Posted January 8, 2008 Hello, Did you all get what i exactly mean for any other info. Plz message me asap. I will get you all the detalis:) Best Reagrds, Nj Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433364 Share on other sites More sharing options...
Ken2k7 Posted January 8, 2008 Share Posted January 8, 2008 Okay then to start off, post your form.html page. Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433506 Share on other sites More sharing options...
naveenbj Posted January 8, 2008 Author Share Posted January 8, 2008 Hello, didnt get wht you mean. you mean i have to post my form.html ? If yes thn wher?? Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433514 Share on other sites More sharing options...
Ken2k7 Posted January 8, 2008 Share Posted January 8, 2008 Hello, didnt get wht you mean. you mean i have to post my form.html ? If yes thn wher?? Post your form.html page here. Don't forget to wrap them in tags. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433517 Share on other sites More sharing options...
naveenbj Posted January 8, 2008 Author Share Posted January 8, 2008 ok thanks here is the code for form.html. <html> <head> <title>Form</title> </head> <body> <p><FONT FACE="Verdana, Arial, Helvetica, sans-serif, Trebuchet MS" SIZE="5" COLOR="#FF9999"> <B>This is a simple example of Data Displaying from a form </B> </FONT></p><form method="post" action="welcome.php"> <P><br> <BR></P><TABLE WIDTH="40%" BORDER="0" CELLSPACING="2" CELLPADDING="1" ALIGN="CENTER" BGCOLOR="#99CCCC"><TR> <TD WIDTH="121"> <P ALIGN="LEFT"><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000">First Name :-</FONT></I></B></P></TD> <TD WIDTH="487"> <P><B><I> <INPUT NAME ="name" TYPE="text" ><br /> </I></B></P></TD></TR><TR> <TD WIDTH="121"> <P><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> Last Name :-</FONT></I></B></P></TD> <TD WIDTH="487"> <P><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"><INPUT NAME ="lastname" TYPE="text" onkeypress="return handleEnter(this, event)"></FONT></I></B></P></TD></TR><TR> <TD WIDTH="121" HEIGHT="27"> <P><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000">Email : -</FONT></I></B></P></TD> <TD WIDTH="487" HEIGHT="27"> <P><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME ="email" TYPE="text"></FONT></I></B></P></TD> </TR><TR> <TD WIDTH="121" HEIGHT="2"> <P><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000">Age:-</FONT></I></B></P></TD> <TD WIDTH="487" HEIGHT="2"> <P><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME ="age" TYPE="text"> </FONT></I></B></P></TD></TR> <TR> <TD WIDTH="121"> <P><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> Gender:-</FONT></I></B></P></TD> <TD WIDTH="487"> <P><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT TYPE="radio" NAME="radiobutton" VALUE="male" onkeypress="return handleEnter(this, event)"> Male <INPUT TYPE="radio" NAME="radiobutton" VALUE="female" onkeypress="return handleEnter(this, event)">Female</FONT></I></B></P></TD></TR> <TR> <TD WIDTH="121"> <P><B><I><FONT COLOR="#FF0000">Address:-</FONT></I></B></P></TD> <TD WIDTH="487"> <P><B><TEXTAREA NAME="address"></TEXTAREA></B></P></TD> </TR><TR> <TD WIDTH="121"><B><I><FONT COLOR="#FF0000">Phone:-</FONT></I></B></TD> <TD WIDTH="487"><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME ="phone" TYPE="text"></FONT></I></B></TD></TR> <TR> <TD WIDTH="121"><B><I><FONT COLOR="#FF0000">Mobile:-</FONT></I></B></TD> <TD WIDTH="487"><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME ="mobile" TYPE="text"></FONT></I></B></TD></TR> <TR> <TD WIDTH="121"><B><I><FONT COLOR="#FF0000">Fax:-</FONT></I></B></TD> <TD WIDTH="487"><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME ="fax" TYPE="text" onkeypress="return handleEnter(this, event)"></FONT></I></B></TD></TR> <TR> <TD WIDTH="121"> </TD> <TD WIDTH="487"><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME="submit" TYPE="submit"> <INPUT TYPE="reset" NAME="Submit" VALUE="reset"> </FONT></I></B></TD></TR></TABLE> <P> </P> <P> </P> </form> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433522 Share on other sites More sharing options...
Ken2k7 Posted January 8, 2008 Share Posted January 8, 2008 Okay, now post welcome.php This is solved? ??? Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433525 Share on other sites More sharing options...
naveenbj Posted January 8, 2008 Author Share Posted January 8, 2008 Hello, Thanks for reply!! Here is the code for welcome.php <html> <head> <title>Form</title> </head> <body> <p><FONT FACE="Verdana, Arial, Helvetica, sans-serif, Trebuchet MS" SIZE="5" COLOR="#FF9999"> <B>This is a simple example of Data Displaying from a form </B> </FONT></p><form method="post" action="welcome.php"> <P><br> <BR></P><TABLE WIDTH="40%" BORDER="0" CELLSPACING="2" CELLPADDING="1" ALIGN="CENTER" BGCOLOR="#99CCCC"><TR> <TD WIDTH="121"> <P ALIGN="LEFT"><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000">First Name :-</FONT></I></B></P></TD> <TD WIDTH="487"> <P><B><I> <INPUT NAME ="name" TYPE="text" ><br /> </I></B></P></TD></TR><TR> <TD WIDTH="121"> <P><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> Last Name :-</FONT></I></B></P></TD> <TD WIDTH="487"> <P><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"><INPUT NAME ="lastname" TYPE="text" onkeypress="return handleEnter(this, event)"></FONT></I></B></P></TD></TR><TR> <TD WIDTH="121" HEIGHT="27"> <P><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000">Email : -</FONT></I></B></P></TD> <TD WIDTH="487" HEIGHT="27"> <P><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME ="email" TYPE="text"></FONT></I></B></P></TD> </TR><TR> <TD WIDTH="121" HEIGHT="2"> <P><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000">Age:-</FONT></I></B></P></TD> <TD WIDTH="487" HEIGHT="2"> <P><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME ="age" TYPE="text"> </FONT></I></B></P></TD></TR> <TR> <TD WIDTH="121"> <P><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> Gender:-</FONT></I></B></P></TD> <TD WIDTH="487"> <P><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT TYPE="radio" NAME="radiobutton" VALUE="male" onkeypress="return handleEnter(this, event)"> Male <INPUT TYPE="radio" NAME="radiobutton" VALUE="female" onkeypress="return handleEnter(this, event)">Female</FONT></I></B></P></TD></TR> <TR> <TD WIDTH="121"> <P><B><I><FONT COLOR="#FF0000">Address:-</FONT></I></B></P></TD> <TD WIDTH="487"> <P><B><TEXTAREA NAME="address"></TEXTAREA></B></P></TD> </TR><TR> <TD WIDTH="121"><B><I><FONT COLOR="#FF0000">Phone:-</FONT></I></B></TD> <TD WIDTH="487"><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME ="phone" TYPE="text"></FONT></I></B></TD></TR> <TR> <TD WIDTH="121"><B><I><FONT COLOR="#FF0000">Mobile:-</FONT></I></B></TD> <TD WIDTH="487"><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME ="mobile" TYPE="text"></FONT></I></B></TD></TR> <TR> <TD WIDTH="121"><B><I><FONT COLOR="#FF0000">Fax:-</FONT></I></B></TD> <TD WIDTH="487"><B><I><FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME ="fax" TYPE="text" onkeypress="return handleEnter(this, event)"></FONT></I></B></TD></TR> <TR> <TD WIDTH="121"> </TD> <TD WIDTH="487"><B><I> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FF0000"> <INPUT NAME="submit" TYPE="submit"> <INPUT TYPE="reset" NAME="Submit" VALUE="reset"> </FONT></I></B></TD></TR></TABLE> <P> </P> <P> </P> </form> </body> </html> ------------------- Regards, Nj Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433527 Share on other sites More sharing options...
Ken2k7 Posted January 8, 2008 Share Posted January 8, 2008 But I thought that was form.html. Where's WELCOME.PHP? Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433529 Share on other sites More sharing options...
naveenbj Posted January 8, 2008 Author Share Posted January 8, 2008 Hello Sry its my mistake:( Reagrds Nj Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433530 Share on other sites More sharing options...
Ken2k7 Posted January 8, 2008 Share Posted January 8, 2008 ??? Do you have the email thing written or you don't know how to write it? Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433537 Share on other sites More sharing options...
naveenbj Posted January 8, 2008 Author Share Posted January 8, 2008 Hello , Thanks for reply!! I dont know how to write . i hope you can help me for this . Regards Nj Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433538 Share on other sites More sharing options...
Ken2k7 Posted January 8, 2008 Share Posted January 8, 2008 I have a small php enabled form and i want this form to send the info(whtever the user entered)in my mail and as well as in the next page . Don't get that. But in welcome.php, you can just say: mail($_POST['email'],"This is the subject","This is the message"); Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433546 Share on other sites More sharing options...
blackcell Posted January 8, 2008 Share Posted January 8, 2008 Are you wanting to retain the initial personal information and click submit to go to another form and then send more data concatenated with the previous? ??? Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433555 Share on other sites More sharing options...
naveenbj Posted January 8, 2008 Author Share Posted January 8, 2008 Hello, Didnt get wht you want to say exactly:( regards Nj Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433556 Share on other sites More sharing options...
naveenbj Posted January 8, 2008 Author Share Posted January 8, 2008 Not exactly. Actually i want the intial info. to be mailed to my mailid and to be displayed in the next page. Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433557 Share on other sites More sharing options...
Ken2k7 Posted January 8, 2008 Share Posted January 8, 2008 Not exactly. Actually i want the intial info. to be mailed to my mailid and to be displayed in the next page. <?php // welcome.php $to = "YOUR EMAIL ADDRESS"; $subject = "SUBJECT OF EMAIL"; $content = "WHAT THE BODY OF THE EMAIL SHOULD SAY"; mail($to, $subject, $content); ?> Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433563 Share on other sites More sharing options...
naveenbj Posted January 8, 2008 Author Share Posted January 8, 2008 Thanks for reply!! What about the $content? Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433568 Share on other sites More sharing options...
Ken2k7 Posted January 8, 2008 Share Posted January 8, 2008 Uh you just put whatever you want in $content. It's like the body of the email. I'm guessing you want all the $_POST information there, so put those in. BTW you have to use "\r\n" to break a line in an email message. Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433569 Share on other sites More sharing options...
naveenbj Posted January 8, 2008 Author Share Posted January 8, 2008 Thanks for reply!! You mean to say like this>> $content = echo $_POST["name"] "\r\n"; echo $_POST["lastname"] "\r\n"; Sry if im wrong but im new in so sm things are still not cleared. It would be great if you can describe me in bit briefly:) i hope you understand:) Best Regards, Nj Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433579 Share on other sites More sharing options...
Ken2k7 Posted January 8, 2008 Share Posted January 8, 2008 No, you put them in as strings. You don't echo them. $content = $_POST['name'] . "\r\n" . $_POST['lastname']; Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-433678 Share on other sites More sharing options...
naveenbj Posted January 9, 2008 Author Share Posted January 9, 2008 Hello, Thanks for reply!! As you wrote i tried but not able to get the output:( Here is the code which i used $to = "nobody@yahoo.com"; $subject = "Form Info"; $content = $_POST['name'] . "\r\n" . $_POST['lastname'] ."\r\n" . $_POST['email'] . "\r\n" . $_POST['age'] ."\r\n" . $_POST['radiobutton'] . "\r\n" . $_POST['address'] ; So is it wrong?? Regards, Nj Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-434278 Share on other sites More sharing options...
Ken2k7 Posted January 9, 2008 Share Posted January 9, 2008 You forgot the mail() function. This do any good? <?php $to = "nobody@yahoo.com"; $subject = "Form Info"; $content = $_POST['name'] . "\r\n" . $_POST['lastname'] ."\r\n" . $_POST['email'] . "\r\n" . $_POST['age'] ."\r\n" . $_POST['radiobutton'] . "\r\n" . $_POST['address']; mail($to, $subject, $content); ?> Quote Link to comment https://forums.phpfreaks.com/topic/84979-solved-is-it-possible-to-send-data-to-a-email-aswellas-some-another-page-from-a-form/#findComment-434280 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.