How to write the code for the back button?

前端 未结 7 544
梦毁少年i
梦毁少年i 2020-12-23 17:43

I have a php code here and I would like to create a "back" href to get me back to where I was before. Here\'s what I have:



        
相关标签:
7条回答
  • 2020-12-23 18:31

    Basically my code sends data to the next page like so:

    **Referring Page**
    $this = $_SERVER['PHP_SELF'];
    echo "<a href='next_page.php?prev=$this'>Next Page</a>";
    
    **Page with button**
    $prev = $_GET['prev'];
    echo "<a href='$prev'><button id='back'>Back</button></a>";
    
    0 讨论(0)
提交回复
热议问题