Jump to content

how to send textarea as input


edwind

Recommended Posts

Hi,

This is driving me to distraction. I have been using this code

<?php
$mailto = "[email protected]";
$subject = "enquiry";
$message = "Values submitted from web site form:";
$header = "From: ".$_POST['email'];
foreach ($_POST as $key => $value)
{
   if (!is_array($value))
   {
      $message .= "\n".$key." : ".$value;
   }
   else
   {
      foreach ($_POST[$key] as $itemvalue)
      {
         $message .= "\n".$key." : ".$itemvalue;
      }
   }
}
mail($mailto, $subject, stripslashes($message), $header);
?>

very successfully but now I want to receive information from a 'textarea' in a form but it just doesn't get treated as input.

The form is here;

        <form name="enquiry" method="post" action="feedback.php">

              <tr>

                <td align="left">Name:</td>

                <td align="right"><input type="text" name="name" size="25" value=""></td>

              </tr>

            <tr>

              <td align="left">email:</td>

              <td align="right"><input type="text" name="email" size="25" value=""></td>

            </tr>

            <tr>

              <td align="left" valign="top">Blurb:</td>

              <td align="right"><textarea rows="4" cols="19" value=""></textarea></td>

            </tr>

        <tr><td colspan="2" align="right">  <input name="submit" type="image" src="report.gif" width="40" height="20" border="0">

        </td></tr></form>

Can anyone please help?

edwind

Link to comment
https://forums.phpfreaks.com/topic/236796-how-to-send-textarea-as-input/
Share on other sites

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.