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 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. 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. 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] 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:[email protected]"> ?????? 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? 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:[email protected]"> 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:[email protected]"> 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. 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)? 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 <[email protected]>, Kelly <[email protected]>' . "\r\n"; $headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n"; $headers .= 'Cc: [email protected]' . "\r\n"; $headers .= 'Bcc: [email protected]' . "\r\n"; // Mail it mail('[email protected]', $subject, $message, $headers); ?> 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. Link to comment https://forums.phpfreaks.com/topic/50753-where-is-the-error/#findComment-249538 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.