It seems to be working for me (renamed page to formtest.cfm)?.

 

<form name="LoginForm" method="post" action="" >

      <table border="0" align="center">

      <tr>

       <td class="show">Username&nbsp;:</td>

     <td ><input type="text" name="username" class="inputbox"></td>

      </tr>

      <tr>

       <td class="show">Password&nbsp;:</td>

     <td ><input type="password" name="pass" class="inputbox"></td>

      </tr>

      <tr>

       <td ><input type="submit"  class="inputbutton" value="login"></td>

     <td ><input type="reset" value ="Clear" class="inputbutton"></td>

      </tr>

      </table>

      </form>

 

 

<cfif isdefined("form.pass") and IsStruct(form)>

   <cfdump var="#form#">

</cfif>

 

Is this on CFMX?

 

 

 


From: Matt Horn [mailto:[EMAIL PROTECTED]
Sent: 06 July 2004 10:26
To: [EMAIL PROTECTED]
Subject: [ cf-dev ] Belated Monday stupidness

 

Hi

 

 I am tearing my hair out with this:

 

I have a form that posts back to itself  but it seems like there are no form variables being posted .

 

the code below is on top of the page and this is the form

 

can anyone see where I am bolloxing it up?

 

thanks

 Matt

 

<form name="LoginForm" method="post" action="" >
      <table border="0" align="center">
      <tr>
       <td class="show">Username&nbsp;:</td>
     <td ><input type="text" name="username" class="inputbox"></td>
      </tr>
      <tr>
       <td class="show">Password&nbsp;:</td>
     <td ><input type="password" name="pass" class="inputbox"></td>
      </tr>
      <tr>
       <td ><input type="submit"  class="inputbutton" value="login"></td>
     <td ><input type="reset" value ="Clear" class="inputbutton"></td>
      </tr>
      </table>
      </form>

 

 


<cfif isdefined("form.pass")>
 <cfquery name="getdetails" datasource="#db#"  dbtype="odbc">
      SELECT userId,productionhouseId from tbluser
      where username='#form.username#'
      and password ='#form.pass#'
 </cfquery>
 
 <CFIF getdetails.recordcount GTE 1>
     <cflock scope="session" timeout="10">
      <cfset session.userId=getdetails.userID>
      <cfset session.productionhouseID=getdetails.productionhouseID>
 </cflock>
      <cflocation url=""
  <CFELSE>
      <script language="_javascript_">
          alert('The username password combination you supplied is incorrect');
  
      </script>
 </CFIF>
 </cfif>

 

 

 

|\--------------------/|
Matt Horn
Web Applications Developer
Ph:+2782 424 3751
W: http://www.matt-horn.org
E:[EMAIL PROTECTED]
|\--------------------/|

This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant, Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com

Reply via email to