DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   ColdFusion (http://www.daniweb.com/forums/forum19.html)
-   -   IF statement (http://www.daniweb.com/forums/thread8473.html)

cfnut Jul 26th, 2004 3:38 pm
IF statement
 
After this line of code:
<cfif Password eq #Password# and UserName eq #UserName#>

If this info is right I want to Display a page called GetPictureFromUser. How do I do this?

dazzlindonna Jul 26th, 2004 4:55 pm
Re: IF statement
 
<cfif Password eq #Password# and UserName eq #UserName#>
<cfinclude template="yourpagetoinclude.cfm">
<cfelse>
<cflocation url="yourloginpage.cfm">
</cfif>

cfnut Jul 26th, 2004 5:30 pm
Re: IF statement
 
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>

dazzlindonna Jul 26th, 2004 7:51 pm
Re: IF statement
 
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.


All times are GMT -4. The time now is 11:32 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC