Current location: Hot Scripts Forums » Programming Languages » ASP » If then statement acting up!


If then statement acting up!

Reply
  #1 (permalink)  
Old 09-30-03, 10:32 AM
geneane's Avatar
geneane geneane is offline
Newbie Coder
 
Join Date: Sep 2003
Location: The Carolinas
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy If then statement acting up!

I have this if then statement that does not return the correct results...even though it is in black and white. please help if you can...



'Retrieve Customer's Info
mySQL = "SELECT " _
& "FROM customers " _
& "WHERE idCust = " & validSQL(idCust,"I") & " "

'Set CursorLocation of the Connection Object back to Server
connTemp.CursorLocation = adUseServer


<%
qpremium = trim(Request.QueryString("premium"))
if len(qpremium) = "Yes" then
%>

Welcome to the Customer Resource Center for Premium Members Only!

<% else %>

Customer Resource Center for Premium Members Only.

<% end if %>




It will only show the first statement if user is premium or not, then if I change the if then statement to

if len(qpremium) = "Yes" then....

the user sees second statement whether premium or not.

??????Puzzled??????
Reply With Quote
  #2 (permalink)  
Old 09-30-03, 04:32 PM
geneane's Avatar
geneane geneane is offline
Newbie Coder
 
Join Date: Sep 2003
Location: The Carolinas
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy

Never mind...I got it thanks for all of your help guys...


Quote:
Originally Posted by geneane
I have this if then statement that does not return the correct results...even though it is in black and white. please help if you can...



'Retrieve Customer's Info
mySQL = "SELECT " _
& "FROM customers " _
& "WHERE idCust = " & validSQL(idCust,"I") & " "

'Set CursorLocation of the Connection Object back to Server
connTemp.CursorLocation = adUseServer


<%
qpremium = trim(Request.QueryString("premium"))
if len(qpremium) = "Yes" then
%>

Welcome to the Customer Resource Center for Premium Members Only!

<% else %>

Customer Resource Center for Premium Members Only.

<% end if %>




It will only show the first statement if user is premium or not, then if I change the if then statement to

if len(qpremium) = "Yes" then....

the user sees second statement whether premium or not.

??????Puzzled??????
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
insert statement sasi ASP 0 08-11-03 09:38 PM
More Difficult Select Statement for Newbie bytwo ASP 2 07-01-03 04:46 AM


All times are GMT -5. The time now is 03:37 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.