Forums

ASP

This topic is locked

Help with simple if then statement

Posted 28 Feb 2008 13:35:07
1
has voted
28 Feb 2008 13:35:07 phil C posted:
could you please tell me why the statement below does not work..

Dim utot
utot=(usercount.Fields.Item("usertotal".Value)
if session("amid"> utot then response.Write("ddd "

utot returns a value 0f 15
session returns a value of 18

Edited by - filco on 28 Feb 2008 13:37:30

Replies

Replied 28 Feb 2008 17:59:29
28 Feb 2008 17:59:29 Javier Castro replied:
can you explain a little bit more? what the result should be?

Javier
"I'm a slow learner and I forget fast" grandpa
DW | FW | ASP | HTML | CSS
Replied 29 Feb 2008 01:58:00
29 Feb 2008 01:58:00 phil C replied:
i am tring to compare the value of a session to that of a field in a recordset.
.

i need to redirect to the index page if the session is equal to or more than the value in the database field.
the datebase is a count of the number of users logged in
the session is the number of users online. if the max number of users online is reached (session=10) then redirect the user that is trying to log in to the index page (response.redirect("index.asp")


Edited by - filco on 29 Feb 2008 01:58:19

Reply to this topic