close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Modifying if statement

Thread began 1/14/2016 9:52 pm by Jason | Last modified 1/16/2016 4:34 pm by Jason | 196 views | 2 replies

Ray BorduinWebAssist

This looks wrong to me.... I think you would want to use or: '||' and not and:'&&'

Because if any one of those conditions fail you would want it to redirect. The statement you have would only redirect to the login page if

person_id is in the url AND the session_id matches the person_id
the household_position value of the user is less than or equal to two
the household values match in the two recordsets
the user is not logged in
take them to the login page

I think it should probably be something like:


if( !isset($_GET['person_id']) || ($_SESSION['userlogin_id'] !== $_GET['person_id'] && $user_household_id->getColumnVal("household_position") <= 2) || $user_household_id->getColumnVal("household") !== $household_id->getColumnVal("household")) || !WA_Auth_RulePasses("People Directory Manager")) {

Which reads:
if there is no person_id in the url
if the session variable user doesn't match the user AND the household position is less than or equal to 2
if the household values don't match
if they aren't logged in
take them to the login page

Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...