Jump to content

Archived

This topic is now archived and is closed to further replies.

Canman2005

if statement - using an OR

Recommended Posts

Dear all

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

I use the following code;

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

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

Share this post


Link to post
Share on other sites
<?php if (($_SESSION['id'] == '43664') || ($_SESSION['id'] == '98411')) { ?>correct<?php } ?>


should do the job :)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.