I have curl data as follows and I want it to be sent to the address I want when I click a button, not when the page is opened, how can I do this?
$data = "" .
"UserCode=".$UserCode."&".
"UserPass=".$UserPass."&".
"OrderNumber=".$OrderNumber."&".
$url ="https://myurl";
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSLVERSION, 4);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 90);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$_result=curl_exec($ch);
<input type='submit' class="btn" value='GO TO URL'/>