I am setting up various forms and features on my site while using the simple method of putting the form posts into variables as below:
if(isset($_POST['one'])){
$name = $_POST['name'];
$description = $_POST['description'];
$category = $_POST['category'];
}
This is obviously a really basic example but that is all I am looking for really. With this kind of method of posting and creating variables, how can you stop the user from entering unwanted text or code and protect your site from any MySQLi injections? I remember in MySQL there was a few options of adding code before the $_POST['name'];
section? Does this still help or work? And if there is a simple method, I would rather that.