'Repair 406 with a textarea inside a form
I have a form with a textarea and an input, but when I submit it, I got error 406 on my server,
I don't have this error on my localhost,
Here's my code:
if( isset($_GET["action"]) && $_GET["action"]=="send_email" && isset($_GET["message"]) )
{
$message = $_GET["message"];
$t = mailContact( $db, $message, ACTION_USER );
redirect($t?"./?message=email_sent":"./?message=email_notSent");
exit();
}
and
echo "<form method='get'>" ;
echo "<input type='hidden' name='action' value='send_email'>" ;
echo "Message:" ;
echo "<br>" ;
echo "<textarea name='message' id='message' style='width:100%;height:200px;'>" ;
echo "Hello,\n" ;
echo "I want to tell you :\n" ;
echo "\n" ;
echo $_SESSION["name"]."\n" ;
echo "</textarea>" ;
echo "<input id='submit' type='submit' value='Send' style='width:200px;'>" ;
echo "</form>" ;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
