check wheres my mistake, please

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
grudz
Forum Commoner
Posts: 68
Joined: Thu Dec 04, 2003 12:52 pm

check wheres my mistake, please

Post by grudz »

i'm still green when it comes to php coding, i usually get these stupid things but im drawing a blank......i want it to link to what $email is (the referer) not actually "$email"....thats what its doing.

$email = $_SERVER['HTTP_REFERER'];

Code: Select all

<?php print ' <a href="$email">' . $email . '</a> -'; ?>
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

try

Code: Select all

echo "<a href="mailto:$email">$email</a>-";
grudz
Forum Commoner
Posts: 68
Joined: Thu Dec 04, 2003 12:52 pm

Post by grudz »

its not an email address.......its a URL......i called it email for another reason......i need it to know that the href is not "$email" but what the variable is.....
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

then use:

Code: Select all

echo "<a href="$email">$email</a>-";
grudz
Forum Commoner
Posts: 68
Joined: Thu Dec 04, 2003 12:52 pm

Post by grudz »

thanx....i had a little brainfreeze....i completly forget the \ to make it litteral....thanx again
Post Reply