Been searching for hours how to get this sorted and I'm on the verge of crying, so figured its time to get some help. It should be easy, but I'm clearly missing something.
I want to get the text from inside a textarea, I'd then perform a MySQL update with the textarea text. I am using PHP and jQuery.
Usually, I'd use $_post in php however, I am using jQuery to display a modal popup. I want the MySQL update code to run, and then the modal popup will display some text saying "Saved". Simple.
All the code is working fine, except I can't get the text. Which is pretty crucial obviously.
So how do I get the text from the textarea?
Form:
<form name = "editProfile">
<textarea rows="2" cols="20" name="bio" id="bio">
Some text.
</textarea>
</form>
Php Code
<?php
$bio = TEXT FROM TEXTAREA;
$sql="Update members SET bio = '$bio' WHERE memberID='$memberID'";
$result=mysql_query($sql);
echo ("Profile Update Sucesful");
?>
That bio.text bit is how you'd do it in asp.net....
The above form is not using a method/action, in fact there probably isn't any need for the "form" tags as I only need the textarea. The modal is launched by a link.
Please help (and please be patient with me). If you need any more info, then let me know. Don't shout. I am new at this.