Solved

PHP Hyperlink

Posted on 2004-03-31
3
3,183 Views
Last Modified: 2012-06-27
Is there any possible way for me to call a php function with a hyperlink or something similar too it?
Thanks
0
Comment
Question by:Zeman4323
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 6

Expert Comment

by:CosminB
ID: 10724260
if you mean like when a user clicks a link or button from your page the answer is no

you can do something like this:
<a href="myscript.php?function=myfunction">Click me</a>
and in your php add
<?php
if ($_GET['function'] == 'myfunction')
{
  myfunction();
}
?>
0
 
LVL 2

Accepted Solution

by:
aabbas earned 125 total points
ID: 10724911
Below is the answer... enter url: http://domain/f.php?f=abc ........ and you will see. :)


<?php
// f.php
  function abc () {
    echo "ABC";
  }

  function xyz () {
    echo "XYZ";
  }

  $v = $_REQUEST["f"];

  $v();
?>

Best of luck.
0
 

Author Comment

by:Zeman4323
ID: 10725803
ok, thanks, didnt think an actual hyperlink was possible, but your way will work perfectly, thanks
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question