[thelist] Asp - the case of single quote that wouldn't die...

Paul Bennett Paul.Bennett at wcc.govt.nz
Wed Dec 5 14:32:53 CST 2007


Proof?

Sure - Go here:
http://tinyurl.com/2mj37x 

Hit one of the 'register' buttons on the calendar 

Enter '4999' as your member id (a valid id in the db)

Hit continue

Be amazed. Or (in my case) cry.

This has to be one of the oddest things I've encountered in a while. I hope it's just something dumb I'm doing...

Paul

-----Original Message-----
From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Tab Alleman
Sent: Thursday, December 06, 2007 9:27 AM
To: thelist at lists.evolt.org
Subject: Re: [thelist] Asp - the case of single quote that wouldn't die...

If there's no stray single quotes in your HTML source, but they're showing up on your page, all I can say is "wow".  

Is this behavior happening somewhere on the web where we can see it?

> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Paul Bennett
> Sent: Wednesday, December 05, 2007 3:10 PM
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] Asp - the case of single quote that wouldn't
> die...
> 
> 
> Thanks for taking the bait Tab :)
> 
> It seems to be related to the include as the 2 other options 
> in the form processing (which don't use the include) work fine.
> 
> Basically after the checks, the data is packaged up and the 
> user is forwarded off-site to enter the CC details.
> 
> I've checked the html output and there are no stray single 
> quotes. In case it helps, the code surrounding the include is:
> ---
> ElseIf Len(Request.Form("memID")) > 0 Then
>     %><!--#include file="includes\memidcheck.asp"--><%
>       ' check user name found in db
>       If Len(txndata2) > 0 Then
>         regName = txndata2
>         amount = Request.Form("member-amount")
>         
>       Else
>         error = "Your name was not found. Please check your 
> member ID is correct."
>       End If
>   ' nonmember registering for event
>   ElseIf [truncated for email purposes]
> ---
> 
> Regards,
> Paul
> 
> 
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org 
> [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Tab Alleman
> Sent: Thursday, December 06, 2007 9:01 AM
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] Asp - the case of single quote that 
> wouldn't die...
> 
> I don't see anything that would cause it.
> 
> 1)  What does the include call and the stuff around it look like?
> 2)  Have you found the single quotes in your HTML source 
> being outputted?   Are they near anything else that might 
> yield any other clues?
> 
> > -----Original Message-----
> > From: thelist-bounces at lists.evolt.org
> > [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Paul Bennett
> > Sent: Wednesday, December 05, 2007 2:52 PM
> > To: thelist at lists.evolt.org
> > Subject: [thelist] Asp - the case of single quote that 
> wouldn't die...
> > 
> > 
> > Hi all,
> > 
> > I'm an ASP noob and encountered the weirdest error last night 
> > (still unresolved). Basically when I include a file, I get 2 
> > single quote characters (' ') being outputted.
> > 
> > It only happens with one particular include (code included at 
> > the end of this email). The code is very simple and doesn't 
> > include any response.write() calls, so I can't for the life 
> > of me figure out what is causing this.
> > 
> > *Any* suggestions welcome:
> > (includes/memidcheck.asp)
> > -----
> > <%
> > 
> > If IsNumeric(Request.Form("memID")) = False Then
> >   error = "Member ID must be a number"
> > Else
> >   
> >   set conn=Server.CreateObject("ADODB.Connection")
> >   conn.Provider="Microsoft.Jet.OLEDB.4.0"
> >   conn.Open "C:\\[path info removed]\\Database\\MemData24.mdb"
> >   
> >   strQuery = "SELECT * FROM MemDB WHERE NUMBER = " & 
> > Request.Form("memID")
> >     
> >   Set RS = conn.Execute(strQuery)
> >   
> >   record = 0
> >   while not RS.EOF
> >     record = 1
> >     
> >     txndata2 = RS.fields(1) & ", " & RS.fields(2)
> >     RS.MoveNext
> >    
> >   wend
> >   
> >   Rs.Close
> >   Set Rs = Nothing
> >   conn.Close
> >   Set conn = Nothing
> >   
> >   
> > End If
> > %>
> > 
> > Regards,
> > Paul
> > -- 
> > 
> > * * Please support the community that supports you.  * *
> > http://evolt.org/help_support_evolt/
> > 
> > For unsubscribe and other options, including the Tip Harvester 
> > and archives of thelist go to: http://lists.evolt.org 
> > Workers of the Web, evolt ! 
> > 
> -- 
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 
> -- 
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 
-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 



More information about the thelist mailing list