Hi, I'm having a problem trying to get PHP to evaluate basic conditionals in my if/ elseif/ else statements. The variables I'm checking against are from a POSTed form and the DB connection is good. Does anyone know why this script might always run to the default "else {" statement? This is a first script on a new job so I'd love to get it going. Thanks for any help!!
<?php
// Do we have authorization?
if (isset($password)) {
if (sha1($password)==="e66799002ee9f20bc25becb7ef414be7bf391bf5" && sha1($username)==="e66799002ee9f20bc25becb7ef414be7bf391bf5") {
$authorized=="yep";
print 'Authorized! ('.$action.')<hr size="1" />';
//.... stuff trimmed
echo $action. " ". $authorized; //prints detail yep
if ($action=="detail" && $authorized=="yep") {
$result = mysql_query("SELECT * FROM `table` WHERE `UID`='$uid' LIMIT 1");
//....
} elseif ($action=="insert" && $authorized=="yep") {
//....
} else { }?>