close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

WA Rule Manager or Server Behaviour?

Thread began 1/31/2011 5:21 pm by Paul | Last modified 2/15/2011 6:02 pm by Paul | 1203 views | 6 replies |

PaulBeta Tester

WA Rule Manager or Server Behaviour?

Hi,

I'm using a SA created login page that if successful, redirects user to an index.php page which is populated from recordset1 based on a session id.

I also want to 'show' a couple of lines of text on the same page based on recordset1, where the session name 'id' has called the correct user record and where the session name 'verified' = 0, and not if = 1

By the way, the same page is also inserting the value 1 into the 'verified' field in my sql table if the session name 'verified' = 0

I've tried both WA Region Rules and server behaviours but neither appear able to distinguish between my 0 or 1 in my verified filed in my sql table.

I'm assuming the session names are assigned before the value is inserted??? Could the recordset be running after the value is inserted perhaps??

Advice welcome,
Paul

Sign in to reply to this post

Jason ByrnesWebAssist

I'm not sure I follow what you are trying to accomplish, but I cant really tell anything with out seeing your page.

Please send a copy of the login page and the index page.

Sign in to reply to this post

PaulBeta Tester

Jason, thank you for your response.

Ok, zip file attached.

Basically I would like to show text on the index.php page if the logged in user's record contains a 0 in the verified field of the same sql table.

There is another element here. If a 0 does exist, the 'update' server behaviour in the index.php page, places a 1 in the verified field of the logged in user record. This should be a one time event triggered on the first users 1st visit to the index.php page.

Paul

Attached Files
Show Region_1-2-2011.zip
Sign in to reply to this post

Jason ByrnesWebAssist

2 issues that jump right out at me in viewing the code;

1) IN the idFirstVisit parameter of the chkVisit recordset, you have a syntax error for the run time value:
$_SSSION['id']

instead of
$_SESSION['id']


2) In the update record behavior, for the verified on column, use the code:
<?php echo(date("F j, Y, g:i a")); ?>

instead of:
<?php date("F j, Y, g:i a")?>

Sign in to reply to this post

PaulBeta Tester

Excellent, thank you Jason.

Whilst you have the index.php file in your care, would you be kind enough to check my date sort in (newest to oldest) in the recordset plHistory?

The result can be seen LogIn.php

user: join123@test123.com
p/w password

The Disruption Date column should show my February 2nd date at the top, but as you see it is not.

Any ideas?

Sign in to reply to this post

Jason ByrnesWebAssist

it is sorting the dates in exactly the way you have specified, in descending order:
30/1/2011
29/1/2011
2/2/2011
01/02/2011


bear in mind that MySQL is seeing a literal string:
2/2/2011

and not February Second 2011 you would need to use the Data Form at function to get the order to work the way you intend:
date-and-time-functions.html#function_date-format


maybe try:
ORDER BY DATE_FORMAT(j_on, '%c/%e/%Y') DESC

Sign in to reply to this post

PaulBeta Tester

Ongoing. Workaround in place.

Thanks, Paul.

Sign in to reply to this post

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

Content

rating

Layout

rating

Ease of use

rating

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...