edwind Posted May 18, 2011 Share Posted May 18, 2011 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 More sharing options...
PFMaBiSmAd Posted May 18, 2011 Share Posted May 18, 2011 You would need to specify a name="..." attribute in your <textarea > tag. Link to comment https://forums.phpfreaks.com/topic/236796-how-to-send-textarea-as-input/#findComment-1217270 Share on other sites More sharing options...
edwind Posted May 18, 2011 Author Share Posted May 18, 2011 Wow you guys are so awesome and so quick. Thankyou, thankyou, thankyou. Link to comment https://forums.phpfreaks.com/topic/236796-how-to-send-textarea-as-input/#findComment-1217274 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.