Solved

How do I both send a Cookie and redirect the browser

Posted on 1998-10-10
4
125 Views
Last Modified: 2013-12-25
How do I both send a Cookie and redirect the browser

       Send "Content-type: text/html"
       Send "Set-Cookie: Skattejagt=user; path=/;"
       Send "Location: " & SetTreasure
       Send ""
0
Comment
Question by:jfl
  • 2
4 Comments
 

Expert Comment

by:bver
Comment Utility
You should not send both content-type and location entity-headers back to a client because these headers are exclusive.

The response should be rather:

       Send "Location: " & SetTreasure
       Send "Set-Cookie: Skattejagt=user; path=/;"
       Send ""

assuming SetTreasure variable contains a valid URI for the redirection target.


0
 

Author Comment

by:jfl
Comment Utility
The browser is not setting a cookie if I redirect
0
 
LVL 5

Accepted Solution

by:
aioudine earned 10 total points
Comment Utility
require("cgilib.pl");
$SetTreasure = "HTTP://WWW.NOVELL.COM";
print "Set-Cookie: user=aioudine; path=/;";
print &PrintHeader;
print "<META http-equiv=\"refresh\" content=\"0;url=".$SetTreasure."\">";
---- end----
0
 

Author Comment

by:jfl
Comment Utility
I have thought about that too, but it's not preferable
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Help with my python script 6 144
php survey script 4 57
Need to learn promise API 2 27
AWS CLI issues with Tags 3 24
Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now