Now heres my problem. In the following coding, it also comes up false ( it tells the user to go back ), and it shouldn't, I believe. $itemeq always ends up the number 1. It basicly says if $pid (the querry), is equal to the the var in the forearch loop, than return false. But $pid is 2, and $itemeq is 1. It also says OR if $pid equals one AND $itemeq equals 9, or 10, than also return false. But again $pid equals 2, and $itemeq equals 1, so what is wrong with my and/ors?
foreach $itemeq (@EITEM) {
print "$itemeq,$pid";
if (($pid eq $itemeq) ^ (($pid eq "1"
&& ($itemeq eq "9" ^ "10"
)) { print "Already something equiped around your
<b>Neck</b>. Go <a href=\"javascript: history.go(-1)\" target=\"_self\">back</a>."; exit; }
if (($pid eq $itemeq) ^ (($pid eq "2"
&& ($itemeq eq "9" ^ "10"
)) { print "Already something equiped around your
<b>Wrists</b>. Go <a href=\"javascript: history.go(-1)\" target=\"_self\">back</a>."; exit; }
if (($pid eq $itemeq) ^ (($pid eq "3"
&& ($itemeq eq "9" ^ "10"
)) { print "Already something equiped in your
<b>Pockets</b>. Go <a href=\"javascript: history.go(-1)\" target=\"_self\">back</a>."; exit; }
if ((($pid eq "4"
&& ($itemeq eq "9" ^ "10"
) ^ ($pid eq $itemeq)) { print "Already something equiped in your
<b>Pouch</b>. Go <a href=\"javascript: history.go(-1)\" target=\"_self\">back</a>."; exit; }
} Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
foreach $itemeq (@EITEM) {
print "$itemeq,$pid";
if (($pid eq $itemeq) ^ (($pid eq "1"
<b>Neck</b>. Go <a href=\"javascript: history.go(-1)\" target=\"_self\">back</a>."; exit; }
if (($pid eq $itemeq) ^ (($pid eq "2"
<b>Wrists</b>. Go <a href=\"javascript: history.go(-1)\" target=\"_self\">back</a>."; exit; }
if (($pid eq $itemeq) ^ (($pid eq "3"
<b>Pockets</b>. Go <a href=\"javascript: history.go(-1)\" target=\"_self\">back</a>."; exit; }
if ((($pid eq "4"
<b>Pouch</b>. Go <a href=\"javascript: history.go(-1)\" target=\"_self\">back</a>."; exit; }
} Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.