Re: How to use Setcookie and Header?

From: Date: Fri, 29 Dec 2000 22:39:10 +0000
Subject: Re: How to use Setcookie and Header?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32243@lists.php.net to get a copy of this message
This question has come up before. IIRC, you can't do both SetCookie() and header() reliably across all browsers... One hack is to do the SetCookie, and then use META HTTP-EQUIV for the redirect. ----- Original Message ----- From: nastaran kashani <nkashani2000@yahoo.com> Newsgroups: php.general Sent: Thursday, December 28, 2000 3:54 PM Subject: [PHP] How to use Setcookie and Header? > Hi, > Happy New Year, > I want to redirect browser to a special page,and also > send some variable quantities to this page.I am > working on "Windows NT 4.0" System,and I used the > following code: > > Current File : > File1.php > ------------ > <?php > $filename="http://myserver/1.wav"; > file://File 1.wav is in the path "c:/inetpub/wwwroot/1.wav" > > > setcookie("filename",$filename,time()+1800,"http://myserver/File2.php"); > header ("Location: http://myserver/File2.php"); > ?> > ------------ > > Destination File: > File2.php > ------------ > <?php > echo "<embed console=smallconsole src=\" filename\" > width=70 height=25>"; > ?> > ------------ > > > > > But I received this error: > Undefined variable filename in the file > c:/inetpub/wwwroot/File2.php line 2 > > > Do you know what is wrong here? > And I don't know where I should delete a cookie. > > Thank You ! > Atieh Kashani > > __________________________________________________ > Do You Yahoo!? > Yahoo! Photos - Share your holiday photos online! > http://photos.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#32243) next »