<?php

require "classes/Vend.php";

$vend = new Vend(); //Instance of Vend class

$_POST['type'] ='mtn';

if(isset($_POST['type'])&&$_POST['type']=='busy'):

 echo $vend->data_bundles('busy?account=233000122');       //busy bundles

elseif(isset($_POST['type']) && $_POST['type']=='surfline'):
 
    $device = $_POST['device'] = '233255042237';

 echo $vend->data_bundles('surfline?device=$device'); //Surfline bundles

elseif(isset($_POST['type']) && $_POST['type']=='mtn'):

    $phoneNo = $_POST['phoneNo'] = '233244274699';
    echo $vend->data_bundles('mtn?phone='.$phoneNo.'&service=mobileinternet'); //mtn bundles

elseif(isset($_POST['type']) && $_POST['type']=='vodafone'):

    echo $vend->data_bundles('vodafone?account=0302222715'); //Vodafone broadband

endif;

?>