php - Set new values on the url -
i have url showing 2 values posted using method in php. can values url using example -
suppose url http://example.com/?name=hannes
my code
<?php echo 'hello ' . htmlspecialchars($_get["name"]) . '!'; ?>
and output hello hannes!
my question is- how can set values url on button click method post eg.
<form method="post"> if(isset($_post['$btn'){ htmlspecialchars($_get["name"])="lucky"; /*if there this*/ } </form>
thank you.
try -
if(isset($_post['$btn'){ header('location:yourpage.php?name='.$yourvalue); exit; }
Comments
Post a Comment