How easy is it to convert the following PHP form submission to an Ajaxy type form.
Here is the PHP:
<?php //Send Tweet
if(isset($_POST['submit'])) {
$qtweet = $_REQUEST['tweet'];
$connection->post('statuses/update', array('status' => $qtweet));
echo "<div style='padding-bottom: 5px; color: #0099FF;'>Updated your Timeline Successfully.</div>";
}
?>
And the HTML form:
<form id="tweethis" method='post' action='index.php'>
<textarea style="width: 346px;" name="tweet" rows="5" id="tweet" ></textarea>
<br />
<span id="charLeft">140</span> Characters left
<br />
<input type='submit' value='Tweet This!' name='submit' id='submit' />
<br />
</form>
I'd like to use Ajax so the page doesnt need to reload.