Jump to content

Connect Button with hook.


sonuyos

Recommended Posts

Alright,


So i want to connect a hook with a button.


In this page - https://domain.com/billing/clientarea.php?action=creditcard

 

There is a button, that when someone update their card, they need to press - http://prntscr.com/nms9wy

I want to attach a code to that button that would trigger a hook.

 

The hook is basically a sendmail hook, that will send a mail from the template.

 

The code is pretty mch ready, however idk hw to connect it.


Here is the hook code.

<?php
 
function cardverification($vars) {
 
$command = "SendEmail";
$adminuser = "ADMIN";
$postData = array(
    'messagename' => 'Verification - Card', //Template Name
    'id' => $clientid, //ClientID taken from the page - https://domain.com/billing/clientarea.php?action=creditcard
);
 
$results = localAPI($command,$postData,$adminuser);
 
 
}
 
?>

Can anyone help?

Edited by sonuyos
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated