Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 21st, 2004, 04:54 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default syntax error

Hi

Can anyone tell me what is wrong with this?

response.redirect("http://www.mysite.com/payment/f1/get_info.asp?Price=" & request.Form("REGION")) & " Country = " & request.Form("COUNTRY"))

thanks

Adam

 
Old September 21st, 2004, 05:06 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Try this

response.redirect("http://www.mysite.com/payment/f1/get_info.asp?Price= ' " & request.Form("REGION")& "' Country ='" & request.Form("COUNTRY")&"' " )

or

response.redirect("http://www.mysite.com/payment/f1/get_info.asp?Price= " & request.Form("REGION")& " Country =" & request.Form("COUNTRY")&" " )

Numan
--------------------------------------------------
Love is the most precious thing of this world. So find it and grab it!
 
Old September 21st, 2004, 05:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

thanks Numan

When I response.write the querystring however, this is what I get:

35 Country =Denmark

Where what I should be getting is 35 Denmark, not Country =

Do you know why I'm getting this too?

thanks

 
Old September 21st, 2004, 05:57 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Quote:
quote:Originally posted by Adam H-W
 thanks Numan

When I response.write the querystring however, this is what I get:

35 Country =Denmark

Where what I should be getting is 35 Denmark, not Country =

thanks

What do you mean by this ? Which queery string are you displaying ?

Numan
--------------------------------------------------
Love is the most precious thing of this world. So find it and grab it!
 
Old September 21st, 2004, 06:43 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Adam you forgot the & between the querystring parameters. Remember it should be
blah.asp?a=1&b=2

Also you should avoid adding spaces in the url, and there's no need for '' around the values (this isn't SQL you know ;)
so you need (...Price=" & request.Form("REGION")& "&Country =" & request.Form("COUNTRY"))

hth
Phil
 
Old September 21st, 2004, 07:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

got it - thanks guys.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: syntax error, unexpected T_ELSE in /h vipin k varghese BOOK: XSLT Programmer's Reference, 2nd Edition 4 September 29th, 2011 01:19 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
Parse error: syntax error, unexpected T_STRING ginost7 Beginning PHP 1 November 9th, 2007 02:51 AM
VB Error: Syntax Error or Access Violation codehappy VB How-To 7 October 3rd, 2007 05:41 PM
Compile error: Syntax error: & Else without HELP Corey VB How-To 2 April 21st, 2006 03:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.