Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing variables through LoginForm.cfm

Status
Not open for further replies.

omerdurdu

Programmer
Joined
Jul 21, 2001
Messages
72
Location
TR
Hello
I have a report page. To edit this page I created a LoginForm.cfm to ask userpassword and username.
When I click edit button it is asking me username and password. After entering username and password, I get into edit page where I am getting error. Seems the variable Dataset_ID not passing to edit page. Can someone help me how am i gonna pass this variable through LoginForm.cfm to edit page.
Thanks


 
Try setting Request.Dataset_ID and calling it from the other page.


This is good if it is a universal setting for all users, but if it is session based..

just use a session variable.

or send it in 'get' query string like ?ID=12
then just reference it in the new page.

I would need to see some code to know what you are talking about but hope this helps


David McIntosh
 
Can you explain alittle bit more
Report page:
________________________________-
<a href=&quot;login/update.cfm?Dataset_ID=<cfoutput>#URL.data1.DAtaset_ID#</cfoutput>&quot; class=&quot;localnav&quot;>Edit/Update (Button>

<cfquery name=&quot;data1&quot; datasource=&quot;dataset1&quot;>
....
...
..
WHERE (((ID.Dataset_ID)=#data1.Dataset_ID#))
</cfquery>

LoginForm.cfm
__________________________________
<CFFORM ACTION=&quot;#CGI.SCRIPT_NAME#&quot; NAME=&quot;LoginForm&quot; METHOD=&quot;POST&quot; target=&quot;_top&quot;>
<!--- Make the UserLogin and UserPassword fields required --->
<INPUT TYPE=&quot;Hidden&quot; NAME=&quot;UserLogin_required&quot;>
<INPUT TYPE=&quot;Hidden&quot; NAME=&quot;UserPassword_required&quot;>
<!--- Use an HTML table for simple formatting --->

<TABLE BORDER=&quot;0&quot; align=&quot;center&quot;>
<TR><TH COLSPAN=&quot;2&quot;><div align=&quot;center&quot;><b><font size=&quot;+2&quot;>Please Log In</font></b></div></TH></TR>
<TR><br>
<TH><b><font color=&quot;Olive&quot;>Username:</font></b></TH>
<TD>
<!--- Text field for &quot;User Name&quot; --->
<CFINPUT
TYPE=&quot;Text&quot;
NAME=&quot;UserLogin&quot;
SIZE=&quot;20&quot;
VALUE=&quot;&quot;
MAXLENGTH=&quot;100&quot;
REQUIRED=&quot;Yes&quot;
MESSAGE=&quot;Please type your Username first.&quot;>
</TD>
</TR>
<TR>
<TH><b><font color=&quot;Olive&quot;>Password:</font></b></TH>
<TD>

<!--- Text field for Password --->
<CFINPUT
TYPE=&quot;Password&quot;
NAME=&quot;UserPassword&quot;
SIZE=&quot;20&quot;
VALUE=&quot;&quot;
MAXLENGTH=&quot;100&quot;
REQUIRED=&quot;Yes&quot;
MESSAGE=&quot;Please type your Password first.&quot;><br>
</tr>
</th>
</td>

<tr>
<td>
<th colspan=&quot;2&quot; align=&quot;left&quot;>
<input type=&quot;submit&quot; value=&quot;Enter&quot; style=&quot;height:25;width:142;font:bold;font-size:10;color:black;background:white&quot;>
</th>
</td>
</td>
</TR>
</TABLE>

</CFFORM>


Update.cfm
_________________________________

<cfquery name=&quot;data1&quot; datasource=&quot;dataset1&quot;>
....
..
WHERE (((ID.Dataset_ID)=#Dataset_ID#))
</cfquery>
<cfform action=&quot;updatex.cfm&quot; method=&quot;POST&quot;>
...
..
</cfform>

_________________________________________________-
The problem is when I click the Edit button on Report page:
the link is:

asking username and password becasue there is a Application.cfm
LoginForm.cfm in that directory where edit pages located.
but when I enter username and password and click enter this time going to edit page but can not figure out what is Dataset_ID.
Thanks for help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top