PHP Hyperlink

Posted on 2004-03-31
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?
Question by:Zeman4323

Expert Comment

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
if ($_GET['function'] == 'myfunction')

Accepted Solution

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

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

  function xyz () {
    echo "XYZ";

  $v = $_REQUEST["f"];


Best of luck.

Author Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

867 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now