0

Hi all,

How Can i call a paricular function in PHP From HTML through href.Anybody can help me for solving this.......

Rajeev

3
Contributors
3
Replies
5
Views
9 Years
Discussion Span
Last Post by rajeevkshr
0

Hmm...don't know if you could do just that, but you could pass a variable in your HREF and then have the PHP script read the variable and then call a certain function based on the variable.

For example

<a href="mypage.php?action=delete">Delete user</a>

Then in your mypage.php page:

<?php 
$action = $_GET['action'];

if ($action == 'delete') {
delete_user();
} else if {
($action == 'create') {
create_user();
}
?>

etc...

0

HREF is Client (Browser) control and PHP is Server Script

So if you need to access the dynamic function from the server at usertime from client browser then we need the help of js. This utility is called ajax (Asynchronous JavaScript and XML)

you can try prototype.js from
http://script.aculo.us; a coool framework for ajax

0

HREF is Client (Browser) control and PHP is Server Script

So if you need to access the dynamic function from the server at usertime from client browser then we need the help of js. This utility is called ajax (Asynchronous JavaScript and XML)

you can try prototype.js from
http://script.aculo.us; a coool framework for ajax

Ok Thanks alot.I will try with this Concepts...........

Rajeev

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.