Is this syntax right

Results 1 to 2 of 2

Thread: Is this syntax right

  1. #1
    Join Date
    Dec 1969

    Default Is this syntax right

    Im using this to try and display a query string, but im having trouble with the exact syntax.<BR><BR><BR>&#060;%my_link=scriptresponder & "?which=" & rstemp("Question_Number")&rstemp("QuizID")&"%&#062 ;

  2. #2
    Join Date
    Dec 1969

    Default RE: Is this syntax right

    Break it down:<BR><BR>&#060;%<BR>my_link _ &#039; okay, you have a variable named that what you want?<BR>= _ &#039; okay you are going to assign something to the variable<BR>scriptresponder _ &#039; you start with the contents of this variable<BR>& _ &#039; and you will concatenate some string...<BR>"?which=" _ &#039; first, this literal string <BR>& _ &#039; concatenate more<BR>rstemp("Question_Number") _ &#039; presumably a number 1,2,3,400?<BR>& _ &#039; concatenate more<BR>rstemp("QuizID") _ &#039; presumably a name? XYZ? NX?<BR>& _ &#039; &#039; concatenate more<BR>" &#039; ummm...what in the hell is that? A single " mark????<BR>%&#062;<BR><BR>Aside from the silly trailing single quote mark, the syntax is correct.<BR><BR>But somehow I seriously doubt that the *semantics* are necessarily what you are after. On the next page, when you do <BR>&#060;%<BR>whichFromPriorPage = Request.QueryString("which")<BR>%&#062;<BR>you are going to get a value like "23PNY" or (worse!) "2341" and how will you know where the question number ends and the quiz id starts?<BR><BR>This assumes, of course, that you actually use the contents of my_link in the right way.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts