| | |
IF statement
Please support our ColdFusion advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
<cfif Password eq #Password# and UserName eq #UserName#>
<cfinclude template="yourpagetoinclude.cfm">
<cfelse>
<cflocation url="yourloginpage.cfm">
</cfif>
<cfinclude template="yourpagetoinclude.cfm">
<cfelse>
<cflocation url="yourloginpage.cfm">
</cfif>
I need to check my ColdFusion Calendar because I think Christmas is coming soon! ;)
***********
Get all the SEO news and tips at SEO Scoop
***********
Get all the SEO news and tips at SEO Scoop
•
•
Join Date: Jul 2004
Posts: 8
Reputation:
Solved Threads: 0
What is the difference between the template and using the url. The template worked although it displayed the information the same page which I guess is fine. The url displayed a blank page.
<cfoutput Query = "login">
<cfif Password eq #Password# and UserName eq #UserName#>
<cfinclude template="GetPictureFromUser.cfm">
<cfelse>
<cflocation url="SignIn.cfm">
</cfif>
</cfoutput>
<cfoutput Query = "login">
<cfif Password eq #Password# and UserName eq #UserName#>
<cfinclude template="GetPictureFromUser.cfm">
<cfelse>
<cflocation url="SignIn.cfm">
</cfif>
</cfoutput>
Just depends how you want to do it - up to you. Either display the info on the same page using cfinclude or send them off to another page using cflocation. Whatever pleases you.
I need to check my ColdFusion Calendar because I think Christmas is coming soon! ;)
***********
Get all the SEO news and tips at SEO Scoop
***********
Get all the SEO news and tips at SEO Scoop
![]() |
Similar Threads
- missing return statement (Java)
- MySQL LIKE statement (MySQL)
- loop in main function to an "if" statement (C++)
- Switch Case Statement (Java)
- run sql statement in asp (ASP)
- switch/case statement (C++)
- change statement (JSP)
- Reading MSWord Document through an ASP Statement (ASP)
Other Threads in the ColdFusion Forum
- Previous Thread: Registration form help
- Next Thread: Need Help with login authentication
| Thread Tools | Search this Thread |





