what you probably want to do is define your form variable as a parameter in
the CF page:

<cfparam name="Form.accept" default="">

<cfif NOT Len(Form.accept) OR Form.accept NEQ 1>
     <cflocation url="otherpage.cfm">
</cfif>

or maybe this might be fractionally more efficient:

<cfparam name="Form.accept" default=1>

<cfif Form.accept NEQ 1>
     <cflocation url="otherpage.cfm">
</cfif>




                                                                                       
                            
                    James                                                              
                            
                    Buckingham           To:     "'[EMAIL PROTECTED]'" <[EMAIL 
PROTECTED]>     
                    <[EMAIL PROTECTED]        cc:                                      
                                 
                    a.com>               Subject:     [ cf-dev ] Newbie: - IF a 
variable doesn't exists THEN       
                                                                                       
                            
                    10/05/2004                                                         
                            
                    12:57                                                              
                            
                    Please                                                             
                            
                    respond to                                                         
                            
                    dev                                                                
                            
                                                                                       
                            
                                                                                       
                            



Hi guys,





I have a variable which is sent to a CF page from an HTML form. What I want
to do is see if the variable exists.





If it does then it loads the page content. If it doesn't the user is
forwarded to another page.





Can anyone tell me how I can change this IF statement to run this check?





<CFIF (#form.accept# neq 1) OR (#form.accept# ** DOESN'T EXIST **)>





Thanks in advance,


JamesB








-- 
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]

Reply via email to