A
A
afonin_vlad2020-01-21 16:55:03
PHP
afonin_vlad, 2020-01-21 16:55:03

How to pass value from form field to php file?

Good afternoon! I tried to find the answer for a long time, maybe I'm just not looking for it. Such a situation: there is a store on Opencart 2. On the product page there is an order form that has a hidden field and some value value is set in it. There is a php file in the same directory with the form submission setting. Question: is it possible to somehow transfer the value of value to a php file (that is, from html to php), such as a variable?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Zhikhor, 2020-01-21
@afonin_vlad

in the form tag in the attribute action="path to the php file" and write method="POST/GET"
and your data is available in your php file using the keys $_POST['name attribute of the input tag'] if passed via get then $_GET ['name attribute of input tag']
https://www.php.net/manual/en/language.variables.e...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question