bean262
03-28-2005, 07:00 PM
Hey Guys...
I am working on a page that allows students to request their dorm room. Each class level is allowed to sign up on a certain date. So, I need my request form to only show content if two criteria are met: Date and ClassLevel
For example:
If today is before Apr 1 2005 and student is a Senior then they see error that says "It is too early!".
If today is Apr 1 2005 and student is Senior then they see the page content.
But, BOTH criteria must be met. I would also want to include code so that if today is Apr 2, 2005 and a student is a Junior then they see the page content.
I don't want Juniors to see the page before their "date". Same for Sophomores and Freshmen. So my dates would be something like:
Apr 1 - Seniors
Apr 2 - Juniors
Apr 3 - Sophomores
Apr 4 - Freshmen
My code so far includes:
<% if Now() < "Mar 28 2005" and rsAcaCL("class_level") = "SR" then %>
<h4>It is too early!!</h4>
<% else %>
<form code here></form>
<% end if %>
I know the form works. It is just that now I want to add the date restrictions. And I can get it work using the classlevel restriction. But the date restriction doesn't work, and they don't work together.
Any help you can provide, it would be great!!
I am working on a page that allows students to request their dorm room. Each class level is allowed to sign up on a certain date. So, I need my request form to only show content if two criteria are met: Date and ClassLevel
For example:
If today is before Apr 1 2005 and student is a Senior then they see error that says "It is too early!".
If today is Apr 1 2005 and student is Senior then they see the page content.
But, BOTH criteria must be met. I would also want to include code so that if today is Apr 2, 2005 and a student is a Junior then they see the page content.
I don't want Juniors to see the page before their "date". Same for Sophomores and Freshmen. So my dates would be something like:
Apr 1 - Seniors
Apr 2 - Juniors
Apr 3 - Sophomores
Apr 4 - Freshmen
My code so far includes:
<% if Now() < "Mar 28 2005" and rsAcaCL("class_level") = "SR" then %>
<h4>It is too early!!</h4>
<% else %>
<form code here></form>
<% end if %>
I know the form works. It is just that now I want to add the date restrictions. And I can get it work using the classlevel restriction. But the date restriction doesn't work, and they don't work together.
Any help you can provide, it would be great!!