I want to redirect to a page using a <button>
tag.. however, it's not working
<?php $url2 = "mission_schedule.php?id=" . urlencode($_GET['id']);?>
<!-- this is not working -->
<button onclick=location.href='<?php echo $url2; ?>'; >Next</button>
<!-- this is working -->
<a href="<?php echo $url2;?>">Next</a>
clicking the button reloads the same page.. while clicking the link redirects me to the right page In addition, this button works in other pages normally