How to echo <a href> to link to a php function???????
Posted: Thu Jul 21, 2005 2:36 am
I have 3 questions and would be thankful in any answers I can get. Lets start with the most important one, which is in the subject.
1. How do I echo a <a href> tag to link to another php function?
For Example:
<?php
echo "<a href=\"<?php a_function() ?>\">LINK</a>";
?>
I keep getting an error. I also tried without the <?php ?> tags but it takes me to the wrong link. I then also tried putting \"<\?php a_function() \?>\" as the target but that also took me to a nonexisting page.
2. Is there any way to detect OnClick javascript with PHP?
3. How do I transfer variable data from javascript to PHP?
1. How do I echo a <a href> tag to link to another php function?
For Example:
<?php
echo "<a href=\"<?php a_function() ?>\">LINK</a>";
?>
I keep getting an error. I also tried without the <?php ?> tags but it takes me to the wrong link. I then also tried putting \"<\?php a_function() \?>\" as the target but that also took me to a nonexisting page.
2. Is there any way to detect OnClick javascript with PHP?
3. How do I transfer variable data from javascript to PHP?