Passing a fields value to a confirmation page

S

sircooljoe

Hello,
I was hoping someone can help me with this.
I have a form, when submitted it sends the users to a confirmation page.
On the confirmation page is a link back to the orginal form.
What I am trying to accomplish, is when the user clicks the link on the
confirmation page, it returns them to the form with a field already
populated.
Thank you in advance for any assistance.

FP2003, access 2000DB using FPDW
 
S

sircooljoe

PS, when the users press the submit button it post directly to the database.
The confirmation page just tells them their data has been entered.
 
S

Stefan B Rusynko

What are you trying to accomplish
- send them back to the form if a field is missing,
- or show them what they posted
(in which case you should not be using a form, but instead use the DBRW




| PS, when the users press the submit button it post directly to the database.
| The confirmation page just tells them their data has been entered.
|
| "sircooljoe" wrote:
|
| >
| > Hello,
| > I was hoping someone can help me with this.
| > I have a form, when submitted it sends the users to a confirmation page.
| > On the confirmation page is a link back to the orginal form.
| > What I am trying to accomplish, is when the user clicks the link on the
| > confirmation page, it returns them to the form with a field already
| > populated.
| > Thank you in advance for any assistance.
| >
| > FP2003, access 2000DB using FPDW
 
S

sircooljoe

Hi Stefan,
Here's what happens and what I want to accomplish.
Under the "form properties" send to database
under the "options" button I have the url of a confirmation page
(confirm.asp) listed. This is where I would like to pass data to, so I can
add it to the end of the return hyperlink.
It is also set to "send to database
1. User selects their user name from a drop down. This value is passed to
next page.
2. The user then selects a company name from a drop down.
3. They are then sent to the form page, they can then add all the contact
information.
4. They press submit, the data is loaded into an access data and they are
directed to a confirmation page that says "Your data has been accepted".
On this confirmation page, I want to create a hyperlink. So that when the
user clicks the link, it returns them to step 2 (their username is already
selected and they see their companies in the drop down
I am trying to avoid having them select their user name again from the drop
down.

I have been able to do this when I am updating data from a form. But I can
seem to pass this data to the confirmation page.
 
S

Stefan B Rusynko

To get a form field (say named: username) as a variable use
<% username=Request.Form("username") %>
See Form Collection on http://www.w3schools.com/asp/asp_ref_request.asp

You can use that variable in your database look up

To use that value on any other page set it as a session variable
(instead of using a query string)
<% Session("username")=Request.Form("username") %>
FYI
Query strings to pass non-numeric values are insecure and are open to SQL injection attacks/hacks

Then on your page with the other form use the session variable
<%=Session("username") %>
as the form field value
<input type="text" value="<%=Session("username") %>" size="20">


PS
Sounds like a very unsecure method of validation
- If everything is a drop down anyone can keep guessing until they get the right combo of user name and company to get in and edit
anyone's data
At least the user name should be a data entry field, (not a drop down of all user names)
- and preferably there should be a second field only they know (normally a password)

A sample of a simple real login in system using both would be at
http://support.microsoft.com/default.aspx?scid=321439


_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


Hi Stefan,
Here's what happens and what I want to accomplish.
Under the "form properties" send to database
under the "options" button I have the url of a confirmation page
(confirm.asp) listed. This is where I would like to pass data to, so I can
add it to the end of the return hyperlink.
It is also set to "send to database
1. User selects their user name from a drop down. This value is passed to
next page.
2. The user then selects a company name from a drop down.
3. They are then sent to the form page, they can then add all the contact
information.
4. They press submit, the data is loaded into an access data and they are
directed to a confirmation page that says "Your data has been accepted".
On this confirmation page, I want to create a hyperlink. So that when the
user clicks the link, it returns them to step 2 (their username is already
selected and they see their companies in the drop down
I am trying to avoid having them select their user name again from the drop
down.

I have been able to do this when I am updating data from a form. But I can
seem to pass this data to the confirmation page.
 
S

sircooljoe

That's it, thank you for the help.

This is an internal facing site, so I am not really concerned about the
security factor.

Stefan B Rusynko said:
To get a form field (say named: username) as a variable use
<% username=Request.Form("username") %>
See Form Collection on http://www.w3schools.com/asp/asp_ref_request.asp

You can use that variable in your database look up

To use that value on any other page set it as a session variable
(instead of using a query string)
<% Session("username")=Request.Form("username") %>
FYI
Query strings to pass non-numeric values are insecure and are open to SQL injection attacks/hacks

Then on your page with the other form use the session variable
<%=Session("username") %>
as the form field value
<input type="text" value="<%=Session("username") %>" size="20">


PS
Sounds like a very unsecure method of validation
- If everything is a drop down anyone can keep guessing until they get the right combo of user name and company to get in and edit
anyone's data
At least the user name should be a data entry field, (not a drop down of all user names)
- and preferably there should be a second field only they know (normally a password)

A sample of a simple real login in system using both would be at
http://support.microsoft.com/default.aspx?scid=321439


_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


Hi Stefan,
Here's what happens and what I want to accomplish.
Under the "form properties" send to database
under the "options" button I have the url of a confirmation page
(confirm.asp) listed. This is where I would like to pass data to, so I can
add it to the end of the return hyperlink.
It is also set to "send to database
1. User selects their user name from a drop down. This value is passed to
next page.
2. The user then selects a company name from a drop down.
3. They are then sent to the form page, they can then add all the contact
information.
4. They press submit, the data is loaded into an access data and they are
directed to a confirmation page that says "Your data has been accepted".
On this confirmation page, I want to create a hyperlink. So that when the
user clicks the link, it returns them to step 2 (their username is already
selected and they see their companies in the drop down
I am trying to avoid having them select their user name again from the drop
down.

I have been able to do this when I am updating data from a form. But I can
seem to pass this data to the confirmation page.

Stefan B Rusynko said:
What are you trying to accomplish
- send them back to the form if a field is missing,
- or show them what they posted
(in which case you should not be using a form, but instead use the DBRW




| PS, when the users press the submit button it post directly to the database.
| The confirmation page just tells them their data has been entered.
|
| "sircooljoe" wrote:
|
| >
| > Hello,
| > I was hoping someone can help me with this.
| > I have a form, when submitted it sends the users to a confirmation page.
| > On the confirmation page is a link back to the orginal form.
| > What I am trying to accomplish, is when the user clicks the link on the
| > confirmation page, it returns them to the form with a field already
| > populated.
| > Thank you in advance for any assistance.
| >
| > FP2003, access 2000DB using FPDW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top