+ 1

What PHP is used for a form in HTML?

I have a couple of forms and search bars on my website that need PHP to be added so they can work, does anyone know what I need to add to make my form and search bars work?

11th Jun 2018, 12:47 AM
Kyle
Kyle - avatar
4 Réponses
+ 2
see this, and if you have any question you can ask https://www.sololearn.com/learn/PHP/1840/
11th Jun 2018, 4:16 AM
🇮🇷 M N
+ 2
PHP will use GET and POST to collect the data..PHP is used on backend to work on the data collected.
11th Jun 2018, 4:51 AM
Mitali
Mitali - avatar
+ 1
form tag in html and _GET and _POST variables in php.
11th Jun 2018, 1:08 AM
Bebida Roja
Bebida Roja - avatar
0
at first your form should have attributes like action, method and enctype. then each of the input type should have a unique names ie. <form action="" method="post"/> <input type="email" name="email" /> <input type="submit" name="submit" value="subscribe"/> </form> then use the value of the name attribute as a php input variable to retrive data from the form. i.e <?PHP extract ($_POST); 👉//if method is post use $_GET if method is get then confirm that submit button clicked like this if ($submit){ echo $email; } ?> to insert in to the data base use the mysqli query ...
11th Jun 2018, 9:52 AM
Prakash
Prakash - avatar