I don't understand why when i submit this form...all it takes me is to a blank page with no feedback or anything...please help
<?php
session_start();
?>
<html>
<head>
<title>Portal</title>
</head>
<body>
<?php
/* Establishes connection to the server and database */
include("connect.php");
?>
<?
if ($_POST[op] != "ds") {
?>
<form method = 'POST' action = '<?= $_SERVER['PHP_SELF'] ?>'>
<select name = 'dept'>
<option><selected>Select a Department</option>
<option value="<?= $support?>">Technical</option>
<option value="<?= $sales?>">Sales</option>
<option value="<?= $billing?>">Billing</option>
</select><br><br>
<?
echo "Enquiry:<br><br>";
?>
<textarea value = '$_POST[enquiry]'></textarea><br><br>
<input type = 'hidden' name = 'op' value = 'ds'>
<input type='submit' name='submit' value='Submit'>
</form>
<?
} else if ($_POST[op] == "ds") {
/*Check each required field and create an error message.
If any of the required fields are blank, set $send to "NO". */
$send == "YES";
if ($_POST[dept] == "") {
$dept_err = "Please select a department.<br>";
$send == "NO";
}
// Now do something depending value of $send
if ($send == "YES") {
if ($_POST[dept] = $support) {
$sendto = "email";
} else if ($_POST[dept] = $sales) {
$sendto = "email";
} else if ($_POST[dept] = $billing) {
$sendto = "email";
}
$mail_text = "test";
mail($sendto, "Enquiry", $mail_text);
echo "submitted successfully";
} else if ($send == "NO") {
echo "$dept_err";
}
}
?>
</body>
</html>