Hi there,
I have a ASP/SQL 7.0 Application and i have a page (page1.asp) that has 2
ways of accessing it.
1 is through a hyperlink on another page (page2.asp), that inserts a value
into a querystring and page1.asp output data from sql according to the
relevant value in the hyperlink =
***page2***
<a href= "page1.asp?value=<% =RS("value")%>"><% =RS("value")%></a>
***page 1***
Set RS = DataConnection.Execute("SELECT fields FROM view WHERE view.col1='"
& request.querystring("value") & "'")
***********
This works OK and i can output the data fine in accordance to the select
statement.
The other way of accessing this page is through page3.asp, which has a text
box and upon clicking submit the value in the text box is put into the
querystring. (this value will be the same as the hyperlink on page 2)=
***page3.asp***
If Request.Form("btn") = "Submit" Then
If Request.Form("textbox") <> "" Then
Dim value
value = Request.Form("textbox")
Response.redirect("page1.asp?value='"& value &"'")
Else
Response.Write("Please enter your value")
End If
End If
**************
This doesnt work and returns a invalid syntax error, and also saying that
there is no record.
The URL has ' around the value. ie URL = .....page1.asp?value='value'
(rather than_ .....page1.asp?value=value
Why would 1 work and not the other????
Help (and sorry if its a tad confusing)
--
Thanks in advance
Fawke
Please remove ANTI and SPAM
from my email address before emailing me.
www.bradflack.com