Forums
This topic is locked
if statments dreamweaver Mx
14 Jul 2004 19:54:45 Sean Mr posted:
im very new to php but i am trying to preform an if statement where 2 variables have to be true in order to do the action , and from what i know the statment should be setup ass if(variable in my case a form post) or (secound variable also a form post) {
action
}else{ opposit action}; & so on but for somereason dreamweaver wont exknowlege the or and i try to substitue it for a && and still no luck ... is there another way to do this? this is the actual code im using :
if (!$_POST['username']) or (!$_POST['password'])
{
$error = true;
trigger_error=( "<strong> Form Errors!!: </strong>\n\n"<img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>
..... theres more but i dont think the rest is important and i did end the if statement further down. I also think im havin probems with the !(varible) command mabe im not to up to speed on what it dose but from my knowlege it re writed the statement so that if there is an error or thevariable dosent exist then it moves on to the rest of the code . Or atleast that was my intention lol