sumolotokai Posted February 9, 2010 Share Posted February 9, 2010 Hi, I am trying to capitalize the input from an incoming email form and have been unable to do it. The browser merely tells me there is a parse error. Thanks in advance. <?php $name = $_POST[name]; $name = ucwords($name); echo "<p>Thank you, <b>$_POST[name]</b>, for your message!</p>";} echo "<p>Your e-mail address is: <b>$_POST[email]</b>.</p>"; echo "<p>Your message was:<br>"; echo "$_POST[message] </p>"; ?> Link to comment https://forums.phpfreaks.com/topic/191493-problem-with-capitalizing-within-email-form/ Share on other sites More sharing options...
Hybride Posted February 9, 2010 Share Posted February 9, 2010 Syntax is actually correct, but the reason for the error is: echo "<p>Thank you, <b>$_POST[name]</b>, for your message!</p>";} // <- remove that curly brace over here Link to comment https://forums.phpfreaks.com/topic/191493-problem-with-capitalizing-within-email-form/#findComment-1009454 Share on other sites More sharing options...
sumolotokai Posted February 9, 2010 Author Share Posted February 9, 2010 Thanks for the quick response. I made the amendment and am still seeing this error. Notice: Use of undefined constant name - assumed 'name' in C:\wamp\www\sendmail.php on line 8 Thank you, helloo, for your message! Your e-mail address is: [email protected]. Your message was: hello this is how the script reads now. $name = $_POST[name]; $name = ucwords($name); echo "<p>Thank you, <b>$_POST[name]</b>, for your message!</p>"; echo "<p>Your e-mail address is: <b>$_POST[email]</b>.</p>"; echo "<p>Your message was:<br>"; echo "$_POST[message] </p>"; Link to comment https://forums.phpfreaks.com/topic/191493-problem-with-capitalizing-within-email-form/#findComment-1009467 Share on other sites More sharing options...
sumolotokai Posted February 9, 2010 Author Share Posted February 9, 2010 aha i was using wamp in the wrong way... sorry for wasting your time i will try not to do this again Link to comment https://forums.phpfreaks.com/topic/191493-problem-with-capitalizing-within-email-form/#findComment-1009747 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.