1

Topic: header mailto

Hi all,

(first note I'm not at all a coder)

So, I'm trying to make a script working as I want it to : its purpose is asking you to click an area of an image and, if test=ok, mailto your address. You click and it lauches the mailer program.

The code is :

if($this->_doCheck()) {
                $_SESSION["tries"] = 0;
                Header("Location: mailto:".$this->email);

It's working, no problem, but I want a link to come back because while it launches the mailer it creates at the same time a blank page where I want a come back link.

I have tried several "hacks", that work in firefox but not in IE : for example :

if($this->_doCheck()) {
                $_SESSION["tries"] = 0;
                Header("Location: mailto:".$this->email);
                echo "<a href=\"".$_SERVER["HTTP_REFERER"]."\">back</a>";

In firefox, I have the link, not in IE.
I hope someone might help me : ) Thanks !

abclf.

Re: header mailto

first: i wouldnt use mailto:, as it opens Outlook, which most of us never use. instead id use the mail(); function in PHP

second: firewalls and maybe IE block the HTTP_REFERER string

not sure how to fix this though

Indocron
$theQuestion = (2*b) || !(2*b);

3

Re: header mailto

Hi Gary, and thank you for replying.

I understand first part of your message ;
but for the second, note there is no firewall here when testing the script, and I almost sure IE doesn't block the referer (ok I'm sure, but I'm not often well informed).
Please note : the url of the blank adress is not "the same" in the "url box" : FF gives me : http://mysite/contact.php?phase=check&PHPSESSID=0343d37(cut)
while IE gives me :
mailto:mymail@gmail.com
(and, FF gives me a link t go back ; not IE that leaves a blank and desertic page).

Ah. I have tested with basic test :

if($this->_doCheck()) {
                $_SESSION["tries"] = 0;
                Header("Location: mailto:".$this->email);
                echo "test";

and IE doens't print "test" ; (FF did it).

abclf.

Re: header mailto

FR: Vide le cache de IE (Outils -> Options internet... -> Général -> Supprimer les fichiers).

EN: Empty the cache from IE.

[img]http://www.famfamfam.com/lab/icons/silk/icons/error.png[/img] /me speaks French and bad English [img]http://www.famfamfam.com/lab/icons/silk/icons/error.png[/img]

5

Re: header mailto

Hi,

sorry, I'm a bit late for replying ; so, emptying the cache was not the good solution. Thanks for trying in helping me. I will have to use the script in an other way.


(désolé, je suis un peu retard pour répondre ; vider le cache n'était pas la bonne solution. Merci d'avoir essayé de m'aider. J'utiliserai le script d'une autre façon.)

abclf.