lonewolf007 Posted May 10, 2007 Share Posted May 10, 2007 All I'm trying to do is create a simple form for a client of mine. So that the fields that are entered will be sent to a email address. But when I click submit nothing happens. I believe I'm missing something very basic from this form but just can't figure out what. okay Ill edit this. be back in a moment Quote Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/ Share on other sites More sharing options...
mmarif4u Posted May 10, 2007 Share Posted May 10, 2007 Ohhh very long to read and not complete. Please post ur error or some code sample where the error is occuring. Quote Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/#findComment-249512 Share on other sites More sharing options...
soycharliente Posted May 10, 2007 Share Posted May 10, 2007 Go to additional options when posting and just attach the file. That would work much better IMHO. Quote Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/#findComment-249513 Share on other sites More sharing options...
lonewolf007 Posted May 10, 2007 Author Share Posted May 10, 2007 Okay here is the entire file. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/#findComment-249522 Share on other sites More sharing options...
jitesh Posted May 10, 2007 Share Posted May 10, 2007 <form name="CornerstoneForm"> <form method="post" action="mailto:markspjr@gmail.com"> ?????? Quote Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/#findComment-249524 Share on other sites More sharing options...
lonewolf007 Posted May 10, 2007 Author Share Posted May 10, 2007 Can I take out the form name part and will it work? Quote Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/#findComment-249525 Share on other sites More sharing options...
john010117 Posted May 10, 2007 Share Posted May 10, 2007 Yes, I believe so. Or... <form name="CornerstoneForm" method="POST" action="mailto:markspjr@gmail.com"> Quote Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/#findComment-249526 Share on other sites More sharing options...
lonewolf007 Posted May 10, 2007 Author Share Posted May 10, 2007 I put <form name="CornerstoneForm" method="POST" action="mailto:markspjr@gmail.com"> in place of the old code. but when I click submit it just reloads the page. ( the button has the pages url as its value somehow. Quote Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/#findComment-249529 Share on other sites More sharing options...
john010117 Posted May 10, 2007 Share Posted May 10, 2007 What does the Javascript function do at the bottom of the page (I'm not fluent in Javascript)? Quote Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/#findComment-249530 Share on other sites More sharing options...
jitesh Posted May 10, 2007 Share Posted May 10, 2007 <form name="CornerstoneForm" method="post" action="sendmail.php"> and in sendmail.php write script like this. <?php // subject $subject = 'Birthday Reminders for August'; // message $message = ' <html> <head> <title>Birthday Reminders for August</title> </head> <body> <p>Here are the birthdays upcoming in August!</p> <table> <tr> <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr> <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> </tr> <tr> <td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr> </table> </body> </html> '; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'To: Mary <markspjr@gmail.com>, Kelly <kelly@example.com>' . "\r\n"; $headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n"; $headers .= 'Cc: birthdayarchive@example.com' . "\r\n"; $headers .= 'Bcc: birthdaycheck@example.com' . "\r\n"; // Mail it mail('markspjr@gmail.com', $subject, $message, $headers); ?> Quote Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/#findComment-249533 Share on other sites More sharing options...
lonewolf007 Posted May 10, 2007 Author Share Posted May 10, 2007 Thank you.... I dont quite fully understand but Ill do my best. Quote Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/#findComment-249538 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.