4
I tried searching the internet, but I couldn’t satisfy my doubt... I started programming web recently, although I have already used post and get, I found myself in a situation where I was "stuck". I have the signup page.php , which is nothing more than a form with text fields for street, neighborhood, zip code and etc... Except that this form has 2 buttons, the Search zip, which opens search_cep.php that searches the zip that the user typed and saved in Sesssions, and returns to register.php with the other fields already filled, but also has the save button, that sends the typed values into the BD... The problem is, the zip code field is in a , POST method, for the search_cep.php, while the other fields are in the save.php Also via post, so I can’t save the zip code in the BD.... I wonder, if I could put everything in one , or send the cep via get to the search.php, since it is small information and does not need privacy...
Put your code or part of it to better understand.
– abfurlan
It would be simpler for the search and save functionality in the same PHP. Then, depending on the pressed Ubmit button, you choose the procedure to take.
– Bacco
GET is used to send parameters through the url, and can be retrieved through $_REQUEST['_param']; or $_GET['_param']; for example: <a href="that.php? p=_param">LINK</a> can be recovered in the.php file using print_r($_GET['_param']) or $_REQUEST['_param'];
– Edilson