Date: 12/29/00
- Next message: Richard Lynch: "Re: [PHP] pfsockopen"
- Previous message: Richard Lynch: "Re: [PHP] ftp site"
- In reply to: nastaran kashani: "[PHP] How to use Setcookie and Header?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>>
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 <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Richard Lynch: "Re: [PHP] pfsockopen"
- Previous message: Richard Lynch: "Re: [PHP] ftp site"
- In reply to: nastaran kashani: "[PHP] How to use Setcookie and Header?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

