Jump to content

Problem with capitalizing within email form.


sumolotokai

Recommended Posts

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>";
?>

 

 

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>";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.