I have a button in my html form that I want it to take user to food.php when they click on it, I did this but it's not redirecting, Please help
<a href="food.php">
<button name="submit" type="button" id="food">Food - Equipment</button> 
</a>
I have a button in my html form that I want it to take user to food.php when they click on it, I did this but it's not redirecting, Please help
<a href="food.php">
<button name="submit" type="button" id="food">Food - Equipment</button> 
</a>
 
    
    Try this:
<a href="food.php" id="food"><button>Food - Equipment</button></a> 
    
    Why use a button element inside a link tag? Why not just:
<a href="food.php" id="food">Food - Equipment</a>
Try that and see if it fixes it.
 
    
    A button is requested, not a link. Sometimes linked php files don't work as expected in some browsers. Use a form submit button and you'll get what you're looking for.
<form action="food.php" method="GET"> <!-- use get or post if you want
                                        to send anything -->
<input type="submit" value="GO">
</form>
