I have a page for registration of users where the user need to provide their name phonenumber etc for registration. It accepts the phone number the following way.
<input type="text" name="telephone" value="<?php echo $telephone; ?>"/>
phonenumber is storend in the db.
When the user checkout and goes to success.php, user should be notified by the sms
This is a API form smsgatewaycenter
<?php
$sendsms ="";
$param['To'] = "123456";
$param['Message'] = "Hello this is test message.";
$param['UserName'] = "my_username";
$param['Password'] = "mypwd";
$param['Mask'] = "TTNERD";
$param['v'] = "1.1";
$param['Type'] = "Individual";
foreach($param as $key=>$val)
{
$sendsms.= $key."=".urlencode($val);
$sendsms.= "&";
}
$sendsms = substr($sendsms, 0, strlen($sendsms)-1);
$url = "http://www.smsgatewaycenter.com/library/send_sms_2.php?".$sendsms;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$curl_scraped_page = curl_exec($ch);
curl_close($ch);
echo $curl_scraped_page;
?>
It works fine but
$param['To'] = "123456";
It sends the sms to the number 123456, i want it to send the sms to the number which is registered by the user during the registration process. Should it be like this?
$param['To'] = '$telephone';
Please help. Thanks in Advance.