Re: header, location: mailto abd browsers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bernard Perrot wrote:

hello,

I have a little problem with this kind of script :

<?php
function mailto ($addr) {
     Header ("Location: mailto:$addr";);
}

mailto("somebody@xxxxxxxxxxxxx");
?>

When called from an html page, it open correctly un MUA from mailing, but with some browser (mozilla for example), the calling page is still displayed, and with some others (firefox for example), a new blank page is displayed (and I don't want).

Any ideas about the problem ? How to solve it ?

Best regards,

From the HTTP RFC:

The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI.

      Location       = "Location" ":" absoluteURI

Your script doesn't appear to be trying to do a re-direct, but rather open a client side e-mail - if you want to do this, then you will need to use JavaScript on the client side.

HTH,

Mikey


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux