Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Syntax for passing parameters
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Syntax for passing parameters

 Post Reply Post Reply
Author
Awangku View Drop Down
Groupie
Groupie


Joined: 15 November 2001
Location: Malaysia
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote Awangku Quote  Post ReplyReply Direct Link To This Post Topic: Syntax for passing parameters
    Posted: 22 June 2003 at 10:03pm

I have this codes in my ASP file. What I'm trying to do is to check whether the record submitted form a form exists in the database or not. If it exists, then I will be directed to another page.

<%
strStuff = Request.Form("Stuff")
.....
If strStuff = [a record in the database] Then
    Response.Redirect "record_exists.asp?ID=strStuff"
End If
%>

My question is, what is the correct syntax for the Response.Redirect parameter? I know the error is in the "ID=strStuff" but I have no idea how to fix that.

Can anyone help?

Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post Posted: 22 June 2003 at 10:52pm
Response.Redirect("record_exists.asp?ID=" & strStuff)
Back to Top
Awangku View Drop Down
Groupie
Groupie


Joined: 15 November 2001
Location: Malaysia
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote Awangku Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2003 at 2:14am

Thanks MadDog. I've completely forgotten that one.

What if I want to pass 2 or more parameters instead of one?

Back to Top
TYSON View Drop Down
Groupie
Groupie


Joined: 18 August 2002
Location: Australia
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote TYSON Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2003 at 8:02am
Response.Redirect("record_exists.asp?ID=" & strStuff & "&ID2=" & strStuff2)


Edited by TYSON
Back to Top
Awangku View Drop Down
Groupie
Groupie


Joined: 15 November 2001
Location: Malaysia
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote Awangku Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2003 at 6:58pm
Thanks Tyson. That's a lot of help.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.