Where are the errors?

Results 1 to 3 of 3

Thread: Where are the errors?

  1. #1
    Join Date
    Dec 1969

    Default Where are the errors?

    Hi, for some reason this page will only ever do the response.write at the bottom, the re-directs don&#039;t seem to be working. Any ideas why this could be?<BR><BR>I&#039;ve changed the username and password for no reason at all.<BR><BR><BR>&#060;%@ Language=VBScript %&#062;<BR>&#060;% option explicit %&#062;<BR>&#060;% Response.Buffer = True %&#062;<BR>&#060;%<BR><BR> Dim RS<BR> Dim conn<BR> Dim SQL<BR><BR> set conn = Server.Createobject("ADODB.Connection")<BR> conn.open ("provider=SQLOLEDB;data source=saturn;database=baps32live;uid=hjgky;pwd=jh gkjhgk")<BR><BR>response.clear<BR>SQL = "exec wwp_web_logon &#039;" <BR>SQL = SQL & trim(request.form("user")) <BR>SQL = SQL & "&#039;,&#039;"<BR>SQL = SQL & trim(request.form("pass")) <BR>SQL = SQL & "&#039;"<BR>set RS = conn.execute(SQL)<BR><BR>IF trim(request.form("user")) &#060;&#062; "" then<BR>IF RS.BOF and RS.EOF then<BR>response.redirect "http://www.wwp.co.uk/booking/courselist.asp"<BR>ELSE<BR>IF trim(request.form("pass")) &#060;&#062; trim(RS("webpassword")) THEN<BR>response.redirect "http://www.wwp.co.uk/booking/fail.asp"<BR>ELSE<BR>response.cookies("contact")=" ******" <BR>response.cookies("custID")=RS("custnumber") <BR><BR>response.redirect "http://www.wwp.co.uk/booking/courselist.asp"<BR>END IF<BR>END IF<BR><BR>ELSE<BR>response.write("Some sort of error here...")<BR>END IF<BR><BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: Where are the errors?

    The only way that the prog can get to your response.write("Some sort of error here...") line is if it fails the first IF statement.

  3. #3
    Join Date
    Dec 1969

    Default Cookies...

    I would GUESS that it&#039;s something to do with the cookies. Cookies are sent using part of the HTTP header. Maybe if you&#039;ve sent cookie information, you&#039;ve already sent a HTTP code saying the page is fine.<BR><BR>An ASP redirect is done using a HTTP redirect (sending a 301 code or whatever it is).<BR><BR>That&#039;s why you can&#039;t write info to the browser and then do a redirect - the 200 ("OK") code has already been sent.<BR><BR>Do a javascript redirect instead.<BR><BR>Craig.

Posting Permissions

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