Results 1 to 2 of 2

Thread: replace(something,"asdf","")

  1. #1
    Join Date
    Dec 1969

    Default replace(something,"asdf","")

    I have a login page (left navigation has login username/password pointing login page), ending with<BR><BR>response.redirect(Request.ServerVariab les("HTTP_REFERER")).<BR><BR>The problem is, if they login with wrong password, they get sent<BR>MyURL=Request.ServerVariables("HTTP_REFERE R") & "?BadLogin=NoRecord"<BR><BR>response.redirect(MyUR L)<BR><BR>and get a js alert "improper details"<BR><BR>If they login again with proper info, they will do the first code, but since referring url has ?BadLogin=NoRecord, they will still get the alert.<BR><BR>If I did <BR> MyURL=Replace(MyURL,"BadLogin=NoRecord"," ")<BR> response.redirect(MyURL")<BR>I would have space, and sometimes my URL would have BadLogin before other values. How do I run a replace statement deleting it? or is that another function, delete(MyURL,"asdf")?<BR><BR>Ok I am really losing my train of thought now..<BR><BR>Thanks, - Leo

  2. #2
    Join Date
    Dec 1969

    Default RE: replace(something,

    &nbsp;<BR>Sounds to me like you are making it *WAY* too hard!<BR><BR>Just do:<BR><BR>referer = Replace( Request.ServerVariables("HTTP_REFERER"), "BadLogin=NoRecord","Login=Okay" )<BR><BR>and then <BR><BR>Response.Redirect referer<BR><BR>You don&#039t get *rid* of the item in the URL (in case, as you pointed out, it precedes or follows some other query string values of importance), you just replace it with something innocuous! Heck you could do<BR><BR>referer = Replace( Request.ServerVariables("HTTP_REFERER"), "BadLogin=NoRecord","pzee1Bx=qM3nnX" )<BR><BR>and confuse the heck out of anybody reading the URL! They&#039d think it was some magic value when it&#039s just innocuous trash thrown in just to get rid of the "BadLogin" junk.<BR><BR><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