Hi all,
How Can i call a paricular function in PHP From HTML through href.Anybody can help me for solving this.......
Rajeev
Hi all,
How Can i call a paricular function in PHP From HTML through href.Anybody can help me for solving this.......
Rajeev
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...
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
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
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.