Good morning!
I am using a simple HTLM page to:
1) display a form with an image and a next/previous/current buttons
2) go to a php file that does processing based on the button the user clicked (updates the image)
3) return to the original HTML form to start the whole process over again (I can figure this step out!)
Problem is, how do I get back to the beginning of the original HTML file from php after I do my php processing? I can use GET/POST in HTML files to go to PHP. And I looked into using header() in php to get back to the beginning of my HTML script but I have already sent output to the browser. I can go to PHP but the return journey eludes me.... 8O hehehehehe
My HTLM file code:
<!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=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<div>
<img src="Image1.png"/>
<form action="But2.php" method="post">
<input type="submit" name="previous" value="Previous">
<input type="submit" name="next" value="Next">
<input type="submit" name="current" value="Current">
</form>
<form method="post" action="<?php print $_SERVER['PHP_SELF']?>">
</div>
</body>
</html>
My PHP file: (just a simple test...my actual php files are many and do a lot of processing)
<?php
if ($_REQUEST["next"]) print "doing something for next</b><br/>\n\n";
if ($_REQUEST["previous"]) print "doing something for previous</b><br/>\n\n";
if ($_REQUEST["current"]) print "doing something for current</b><br/>\n\n";
// Want to go back to beginning of original HTLM script at this point
?>