Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

Help with Log In User and adding URL parameter

Posted 01 May 2005 05:29:27
1
has voted
01 May 2005 05:29:27 DAvid Griffiths posted:
Ok, here's what I have so far. Using ASP VB with a MySQL database.

A login page with the usual form. When login is successful the user is redirected to an index.asp page within the "clients" directory. This index.asp page contains a recordset that holds a list of jobs and their dates in a repeating table. What I would like to do is pass from the login page to the index page some form of either URL parameter or form variable that changes depending on who logs in. i.e. bob logs in and is redirected to .../index.asp?Customer_ID=1 and jim logs in and is redirected to .../index.asp?Customer_ID=2, etc.

I've created a recordset in the login page that contains the username (usr field) and the customer ID (Customer_ID) field. I set the filter to use the form variable from the login form username text field. When applying the User Authentication behavior and selecting the page to be redirected to I browse to the index.asp page I have the option to add parameters. I select the "Customer_ID" entry from the recordset and allow Dreamweaver to do it's thing. When attempting to preview the page in browser though I get the following error.

Technical Information (for support personnel)

* Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/ghost_light/testgallery/login.asp, line 31, column 71
MM_redirectLoginSuccess="index.asp?Customer_ID=<%=(rsuser.Fields.Item("Customer_ID".Value)
----------------------------------------------------------------------^

* Browser Type:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

* Page:
GET /ghost_light/testgallery/login.asp

Any thoughts?

Thanks in advance,

David

Replies

Replied 03 May 2005 17:43:14
03 May 2005 17:43:14 Lee Diggins replied:
Hi David

Change this:
MM_redirectLoginSuccess="index.asp?Customer_ID=<%=(rsuser.Fields.Item("Customer_ID".Value)

to this:
MM_redirectLoginSuccess="index.asp?Customer_ID=" & rsuser.Fields.Item("Customer_ID".Value


Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>

Reply to this topic