Here is my php code, which is what I have been getting errors with. I'm not sure if i'm not connecting to the database correctly, if there may be an issue with my submit button (which i doubt), or if it's an issue in my syntax. If anyone could help me, I would be grateful.
<?php
$servername = "localhost";
$username = "kaylahblack";
$password = "";
$dbname = "pastalist";
$conn = mysqli_connect('localhost','kaylahblack','', 'pastalist');
if(isset($_POST['submit']))
{
$sauce=$_POST['sauce'];
$meat=$_POST['meat'];
$noodle=$_POST['noodle'];
$sql = "INSERT INTO pastalistt (sauce, meat, noodle)
VALUES ('$sauce', '$meat', '$noodle')";
$result=mysqli_query($sql);
if($result){
echo "Pasta Added!";
}
}
mysqli_close($conn);
?>