I have a php page called posts.php, this page just select all
from a database table named posts
and display them. Down the page I have a textarea named post
. When I press the submit button the AJAX script will send the text from textarea to a page called insert.php
. This insert.php
gets the submited text and insert it into posts
table. How can I do this and how can I upload the posts.php
when I have inserted a post into posts
table.
Example:
User 123 writes a message in the textarea. He presses submit button. AJAX sends the post to insert.php
. Insert.php
inserts the post into posts
tabel. Posts.php
shows the message.