I am currently finishing up part of my theme manager page, but have hot a roadblock
My code is follows...
<?php
if($_POST['submit']){
$name = mysqli_prep($_POST['name']);
// SET PREVIOUSLY ACTIVE THEME TO INACTIVE
$sql = "UPDATE themes SET
active = 0
WHERE (active = 1 AND name != $name)
LIMIT 1";
$result = mysqli_query($connect, $sql);
echo "Confirming Inactive Theme...\n";
confirm_query($result);
if($result){
echo "Theme Unselected";
}
// SET SELECTED THEME TO ACTIVE
$sql = "UPDATE themes SET
active = 1
WHERE name = $name
LIMIT 1";
$result = mysqli_query($connect, $sql);
echo "Confirming Active Theme...\n";
confirm_query($result);
if($result){
echo "Theme Selected";
}
//redirect_to("/home/admin/themes.php");
}
?>
I get the following in the browser...
Confirming Inactive Theme... Database query failed: Unknown column 'Easter' in 'where clause'
I have no clue what's going on, I must have missed something, but can't figure it out.