Jump to content


Photo

if statement - using an OR


  • Please log in to reply
1 reply to this topic

#1 Canman2005

Canman2005
  • Members
  • PipPipPip
  • Advanced Member
  • 669 posts

Posted 29 March 2006 - 09:00 AM

Dear all

I have a if statement which checks to see if a session is a specific ID number.

I use the following code;

<? if ($_SESSION['id'] == '43664') { ?>correct<? } ?>

I want to be able to check against another id number called

$_SESSION['id'] == '98411'

How can I combine the two statements, so it can use either of those numbers held in the session.

Thanks in advance if anyone can help

Ed

#2 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 29 March 2006 - 09:24 AM

<?php if (($_SESSION['id'] == '43664') || ($_SESSION['id'] == '98411')) { ?>correct<?php } ?>


should do the job :)
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users