/ Published in: PHP
Bind this particular custom function to a button and name that button as generate your link or any anchor does work, better pass it with a JavaScript's through the action and send the variable or make a ajax call and send it.....or in the action assign it to the php page and call that function then rest u can read from the below code....formatted....