AJAX Tutorial - 1 - Introduction to AJAX
Why Stack Overflow recommends it
Stack Overflow users link it when a questioner needs a basic AJAX primer instead of a full code answer, often alongside PHP form or page-update questions.
Recommended by 3 people across 3 different months, 2013 to 2015.
What it is
A short beginner video from thenewboston that opens an AJAX tutorial series, explaining what AJAX is and what it lets a web page do. It is the first episode of a playlist aimed at people new to client-server requests in the browser.
What people said
Recommends Lyndon Armitage · 2013-09 · Stack Overflow · on “How to present a pretty printed Java source located outside the HTML file?”
As mentioned in another answer you would use Ajax to load the file into the element then run prettyPrint() on it. There's a basic tutorial for ajax at w3schools [LINK] , or thenewboston [this video]
Recommends Searay330 · 2015-09 · Stack Overflow · on “fill in automatic way a form using php and ajax”
i mean i could just write the whole thing for you but that's not really what this is for. and you wouldnt learn anything, i mean i would recommend that you watch the newbostons ajax series as it is a good tutorial for what you are looking for [this video]
Recommends Jujunol · 2015-10 · Stack Overflow · on “PHP and MySQL error & Updating”
You should probably switch to PDO or MySQLi as MySQL is depreciated and will be removed in the future. Pressing on, a future error you will encounter is that you can't use quotes (also vulnerable to SQL injection) this is because you are not doing anything to prevent this. To fix this, assure that anything from $_POST or $_GET is wrapped with mysql_real_escape_string Addressing your time issue, you can use the MySQL function now() Addressing your AJAX issue, you can learn from this convenient YouTube tutorial playlist : [this video] After patching everything mentioned you code should look something like this: if(isset($_POST["submit"])) { $firstname = mysql_real_escape_string($_POST["forename"]);