OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

redirect values

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> redirect values
Page: [1]
 
chadb

 

Posts: 501
From: Kansas
Status: offline

 
redirect values - 8/25/2009 11:41:50   
I have a form that submits, on the form submit page it checks a database against one of the fiels, if it does not match I would like to redirect back to the form page. My question is, how can I pass a variable back. Can I pass a request.form on a response.redirect?

Thanks,
Chad
ou812

 

Posts: 1705
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: redirect values - 8/25/2009 12:43:25   
I usually pass the variable(s) back in a query string. Something like:
somestuff = request.form("yourstuff")
Response.Redirect("somepage.asp?somevariable=" & somestuff)

And then look for the querystring variables and do something accordingly.

_____________________________

-brian

Black Holes suck.

EnterpriseDB: Enterprise-class relational database management system
PostgreSQL: The world's most advanced open source database

(in reply to chadb)
chadb

 

Posts: 501
From: Kansas
Status: offline

 
RE: redirect values - 8/25/2009 13:32:00   
quote:

Response.Redirect("somepage.asp?somevariable=" & somestuff)


OK, here is what I tried, please let me know where I am going wrong.

Form page:
<input type="text" name="T1" size="20" value="<%response.write somevariable %>">

Action Page:

<%
dim somevariable

somestuff = "test"

Response.Redirect("test.asp?somevariable=" & somestuff)

%>

but it does not work.

(in reply to ou812)
ou812

 

Posts: 1705
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: redirect values - 8/25/2009 16:03:36   
Hmm, it looks okay. What is it or isn't it doing?

When your on your test.asp page and check the contents what does it do, or not do? Or is it not getting to test.asp?
eg.
x=request.querystring("somevariable")
response.write x

_____________________________

-brian

Black Holes suck.

EnterpriseDB: Enterprise-class relational database management system
PostgreSQL: The world's most advanced open source database

(in reply to chadb)
chadb

 

Posts: 501
From: Kansas
Status: offline

 
RE: redirect values - 8/25/2009 16:08:45   
OK, that worked. Thanks for the help.

(in reply to ou812)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> redirect values
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts