Hi All
I need help in calling a PHP function on user action(clicking a link).
I want to call a function when user clicks the link on a page instead of page load.
The function actually creates a symlink to the video file,so i don't want to create the link on initial page load and I want to create the link when user click the play link.
sample code..
function createLink()
{
//link creation
return $url;
}
html code
<a href="<? =createLink()?>" />
Please help me out.
Raj
Thanks
call the function when user clicks the link
Moderator: General Moderators
-
rajendernreddy
- Forum Newbie
- Posts: 1
- Joined: Sat Jun 20, 2009 11:23 pm
Re: call the function when user clicks the link
I'll leave you to figure out how to get the symlink to work, I was never able to get it to work like I wanted, so I can't help there. But this is how to structure your code. (you are very close to getting it right)
Code: Select all
<? function createLink()
{
//generate link and just echo it when ready
echo 'http://my.symlink.video';
}
?>
html code
<a href="<? createLink()?>">Click here</a>