code for back button

ariffantasi

New Member
hi i have a php code here and i would like to create a "back" href to get me back where I was before. \[code\]<input type="submit" <a href="http://stackoverflow.com/questions/3659782/#" onclick="history.back();">"Back"</a> <html> <head></head> <body> <?php // get form selection $day = $_GET['day']; // check value and select appropriate item if ($day == 1) { $special = 'Chicken in oyster sauce'; } elseif ($day == 2) { $special = 'French onion soup'; } elseif ($day == 3) { $special = 'Pork chops with mashed potatoes and green salad'; } else { $special = 'Fish and chips'; } ?> <h2>Today's special is:</h2> <?php echo $special; ?> <input type="submit" <a href="http://stackoverflow.com/questions/3659782/#" onclick="history.back();">"Back"</a> </body> </html> \[/code\]
 
Back
Top