Skip to content Skip to sidebar Skip to footer

How To Display Button Name On Another Page When Button Is Clicked

I'm trying to display the name of a button on another page when a button is clicked. For example:

Solution 1:

Try This

    <a href="your_page.php?button=maths" class="btn btn-danger btn-lg btn-block">Maths</a>
<a href="your_page.php?button=english" class="btn btn-danger btn-lg btn-block">Maths</a>

on your_page.php you can easily get which button is pressed by the following command

$pressedButton = $_REQUEST['button'];
echo $pressedbutton;

Post a Comment for "How To Display Button Name On Another Page When Button Is Clicked"