This question already has an answer here:
- How can I prevent SQL injection in PHP? 28 answers
So I am just learning about databases and I want to be able to store user inputs. Can someone give me a basic example on how to get form data and save it to a database using php? Also making the form secure from sql attacks
sample.html
sample.php
This is a very basic example. Many PHP developers today are turning to PDO. Mysqli isn’t obsolete, but PDO is much easier, IMHO.