I'm just curious is this right below? <% Dim variable variable = Request.QueryString("channel") %> we need to grab the text from www.mydomain.com?channel=text Then pass it into a URL on the page? So basically just grab the url parameter "channel" then pass it into another URL on the page.. how would I do that? Is the top code right?
That cde is exactly how you would do it, but you should also check for SQL injection and a few other things, depending on what channel is used for. I usually use a left function if you know the max length that channel is going to be because it stops people doing this: www.mydomain.com?channel=ihaveCompleteControlOfYourDatabaseNow_muuuahahhahah
It won't be entering into a database, but you say this is correct below? <% Dim source source = Request.QueryString("source") %> So the parameter gets signed into source? Then I can use the response.write() function to show it in the url?
Your code is correct. I added the line to write the url: <% Dim source source = Request.QueryString("source") Response.Write("<a href=""somepage.asp?source=" & source & """>click here</a>") %> Note that you have to use double quotes where you need a quotation mark in your response.write string. -Jim
Yes, you can. But remove the quotes or you'll pass the literal text string source on the querystring instead of the variable. You can also do this: <a href="page.php?source=<%=source %>"> %= is a shorthand way of writing response.write -Jim
I need to use response.write() to echo the variable out though don't I? What does =source mean? I need the text from the variable to into into the URL query string.
Sorry for the confusion. I renamed your variable to source in my example. I should of written: <% Dim variable variable = Request.QueryString("channel") %> And then you echo the variable out using: <a href="page.php?source=<%=variable %>"> <%=variable %> is a shorthand way of writing <% Response.Write(variable) %> Hope that clears up everything. -Jim