Page 1 of 1

does this work

Posted: Thu Jan 08, 2004 8:22 pm
by OX 3
would the following code work
<?php
assign("$flare","tempestflarex@hotmail.com");
?>
<a href="
<?php
print("$flare");
?>
">
<?php
print("$flare");
?>
</a>

Posted: Thu Jan 08, 2004 8:37 pm
by AVATAr
to make a mail link: <a href="mailto:email@web.com"> here </a>

and try your code...

Posted: Thu Jan 08, 2004 8:40 pm
by Weirdan
If you implement the function `assign` it would. something like this:

Code: Select all

function assign($var_name,$var_value){
  global $$var_name;
  $$var_name=$var_value;
}
//call it as follows:
assign("flare","tempestflarex@hotmail.com");

Posted: Thu Jan 08, 2004 8:45 pm
by OX 3
i am clueless

Posted: Fri Jan 09, 2004 12:25 am
by Bennettman
To answer your question, yes it would work, apart from the lack of "mailto:" needed to make it an email link. However, this is a more effective method:

Code: Select all

<?php
$flare = "tempestflarex@hotmail.com";
print "<a href="mailto:$flare">$flare</a>";
?>
What's the purpose of the code? I don't see any point in doing it like that unless $flare could be one of a number of email addresses.

Posted: Fri Jan 09, 2004 8:15 am
by OX 3
it works thx ben