You have to use the comparison operator ==
instead of =
if (isset($_POST['submit'])) {
if (!empty($_POST['electronics'])) {
if ($_POST['electronics'] == "camera") {
header("location: camera.php");
}
else if ($_POST['electronics'] == "cell") {
header("location: cellphones.php");
}
else if ($_POST['electronics'] == "cable") {
header("location: cables.php");
}
else if ($_POST['electronics'] == "tv") {
header("location: tv.php");
}
}
...
Also, the exit()
is also redundant as you are already redirecting to another page.