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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -