Set cookies and redir users according to cookie se

Results 1 to 2 of 2

Thread: Set cookies and redir users according to cookie se

  1. #1
    Tanvi Guest

    Default Set cookies and redir users according to cookie se

    When I use code to set cookies in the client machine, Iam getting an http error say.<BR>I used the following code.<BR>in def.asp,<BR>&#060;form name="form" action="redir1.asp"<BR>&#060;input type=text name="name" size="20"&#062;<BR>&#060;input type=submit name=submit value=set&#062;<BR>&#060;/form&#062;<BR>&#060;/html&#062;<BR>in redir1.asp,<BR>&#060;%Response.buffer=true<BR>varn ame = Request.form("name")<BR><BR>Response.cookies("name ") = varname<BR><BR>varname = Request.cookies("name")<BR><BR>Reponse.write(varna me)<BR>%&#062;<BR><BR>Could any body tell me why my cookie is not getting set?is there any thing wrong in my code?<BR>Another thing ,I want to redirect the user depending on cookie set/not set.<BR>say,If cookie is set,redirect him to redir2.asp<BR>if cookie is not set redirect him to redir3.asp<BR>How to achieve,<BR>1.setting the cookie<BR>2.check if cookie is set.<BR>3.if set then redirect user to redir2.asp<BR>4.else redirect him to redir3.asp?<BR>I would be very thankful if any body c

  2. #2
    Join Date
    Dec 1969

    Default RE: Set cookies and redir users according to cooki

    Check the Syntax of last &#039Response.write&#039<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