Hey I'm fairly novice when it comes to php and sql so forgive me if this is a mess but I am trying to switch my code from mysql to mysqli and these queries are no longer working. I have tried a bunch of stuff and from what I can tell this looks correct but it still isn't working. The user I'm logging into the db with definitely has the permissions to insert and delete. Am I missing something obvious?
$db_host = 'localhost';
$db_user = 'db_user';
$db_pass = 'password';
$db_database = 'database';
$db = new mysqli($db_host, $db_user, $db_pass, $db_database);
if ($_POST['submit2']){
$promo = $_POST['promotext'];
$sql = "INSERT INTO 'promo' ('words') VALUES ('$promo')";
mysqli_query($db, $sql);
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('Posted Succesfully!.')
window.location.href='promo.html'
</SCRIPT>");
exit();
}
if ($_POST['delete']){
$sql = "DELETE FROM 'promo' WHERE id>0";
mysqli_query($db, $sql);
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('Deleted Succesfully!.')
window.location.href='promo.html'
</SCRIPT>");
exit();
}