August 11, 2011

PHP Go Back Button Example

PHP Go Back Button Example

Page 1:

 

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<title>Page1 Example Go Back</title>
</head>

<body>
<form action=”page2.php” method=”post”>
<input type=”submit” />
</form>

</body>
</html>

 

Page2:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<title>Page2 Example Go Back</title>
</head>

<body>
<input type=”button” onclick=”history.back();” value=”Back” />
</body>
</html>

 

Last updated: March 19, 2014