Browsers already have “back” buttons, so you’d better have a darn good reason for needing to put one on your page!
<input type="button" value="Go Back From Whence You Came!" onclick="history.back(-1)" />
$url = htmlspecialchars($_SERVER['HTTP_REFERER']);
echo "<a href='$url'>back</a>";
Before we are going with example let’s read something about jQuery and AJAX.
In this example we are submitting a simple form using AJAX.
To create a form first we are creating a database with name “ajax”.
Create a config file with name config.php.
$dbhost = "localhost"; //replace it with your host name
$dbuser="root"; //replace it with your database username
$dbpassword=""; // replace it with your database password
$dbname="ajax"; // replace it with your database name
?> Continue reading
What is jQuery ?
What is AJAX ?
If you need to check the example on jQuery AJAX, you can check it out here