% newstr = "" newstr = request.servervariables("HTTP_HOST") if Instr(lcase(newstr), "freecheck") Then response.redirect("notFound.html") response.end end if newstr = replace(newstr,"anotherstreasures.com","") newstr = replace(newstr,"poststuff.com","") newstr = replace(newstr,"www.","") newstr = replace(newstr,".","") newstr = trim(newstr) UserName = newstr if username = "" then username = -1 'if username = -1 and instr(1,request.servervariables("HTTP_HOST"),"anotherstreasures.com") then ' response.redirect "index3.htm" ' response.end 'end if 'response.write username set db = server.createobject("ADODB.CONNECTION") db.open "AT" set rs = db.execute("SELECT tUser.PK_UserID, tSale.PK_SaleID FROM tUser INNER JOIN tSale ON tUser.PK_UserID = tSale.FK_UserID WHERE pagewebname='" & LCase(UserName) & "'") if not rs.eof then PageID = rs("PK_UserID") else PageID=0 if not rs.eof then SaleID = rs("PK_SaleID") else SaleID=0 %>