Answer the question
In order to leave comments, you need to log in
How to assign a value to a variable from GET?
Good day!
There is a form on the index.php page, the POST method passes the values to the /php/script.php script, the script writes the values to the database, and redirects the same values to the script at the root using the GET method
header('Location: /otvet.php?name='.$value.'&name2='.$value2.'&name3='.$value3);
Answer the question
In order to leave comments, you need to log in
Maybe so?
header('Location: /otvet.php?'.http_build_query([
'name' => $_POST['name'],
'name2' => $_POST['name2'],
'name3' => $_POST['name3'],
]));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question