Forums / Templates, Stylesheets, Page Layout / Need to override $email define...

Need to override $email define...

Locked

Views: 1,319

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
7 Aug 2008, 5:26 AM
#1
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Need to override $email define...

Hi, I'm using this snippet of code in "html_header.php"...
it emails me when Googlebot comes to visit, pretty handy tool.

...except that it seems to put MY EMAIL ADDRESS into the 'contact us' form on my website!?!?!?

<?php
$email = "[email protected]";
if(eregi("googlebot",$_SERVER['HTTP_USER_AGENT']))
{
mail($email, "The Googlebot came to call",
"Google has visited: ".$_SERVER['REQUEST_URI']);
}
?>

How can I change the variable so that it doesn't do this?
I tried changing the above "$email" to "$email2"...but it still does it!!

How can I get this to work without interfering with ZC?

7 Aug 2008, 6:55 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Need to override $email define...

Just use a different variable ... ie: something other than what is used in any of the template files.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Aug 2008, 7:35 AM
#3
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Re: Need to override $email define...

Hmm, I tried using "$email2" (nothing showed up in devtoolkit)...but it didn't work.

Now I just tried "gbot" and it seems to have done the trick!

sigh It's late.

Thx Dr.B