I have a form in HTML, in which I am pulling values from with PHP. I would like to insert it into a database with SQL, but (from my experience with this issue, at least) you can't insert $_POST values with an SQL statement.
When the page is loaded on XAMPP, I get the following error of:
Notice: Undefined index: email in C:\xampp\htdocs\index.php on line 26
My code looks something like this:
<form method="post">
<input type="text" placeholder="Firstname" name="email">
<button class="btndef" name="submit">Submit</button>
</form>
<?php
$email = $_POST['email'];
?>
Obviously something's wrong with it, but I have no idea what!