I am trying to post text throught textarea, but I have a problem, my prob is that textarea is inside popup and when I submit form get empty string, thus I can't to insert only textarea value, with other inputs that are outside popup doesn't have problem.
HTML:
<form action="index.php" method="post">
<!-- here are some input texts -->
<input type="text">.........
<!-- but here is a button, when click it show this popup which is written below -->
<input type="button" onclick="showPopup()">
<!-- popup -->
<div id="overlay"></div>
<div id="popup">
<textarea name="txt"></textarea>
<input id="hidepopup" onclick="hidePopup()" type="button" value="Hide popup">
</div>
<input type="submit" name="submit" value="Submit Form">
</form>
PHP:
if(isset($_POST["submit"])
{
$textarea = $_POST["txt"];
$query = "INSERT INTO table ";
$query .= "(text, other inputss....) VALUES("'$textarea', other inputs...")";
$result = mysql_query($con, $query);
if($result) {
echo $textarea; // here I get empty string :(
}
}