title: SMS GATEWAY ISSUE in PHP
body: <p>I am integrating SMS gateway for the very first time. I want to send sms when someone pays to the website. I am using the following code:</p>
  
  <pre><code>&lt;?php  
  $pay="1000"; 
  $msg="Arivind"; 
  echo $url="http://yourdomainname.com/api/swsend.asp?username=xxxxxx&amp;password=xxxxxx&amp;sender=SENDERID&amp;sendto=91XXXXXXXXX&amp;message=Dear'$msg' Thanks for making payment of Rs '$pay'"; 
  $c=curl_init(); 
  curl_setopt($c,CURLOPT_RETURNTRANSFER,1); 
  curl_setopt($c,CURLOPT_URL,$url); 
  $contents=curl_exec($c); 
  curl_close($c); 
  echo "SMS Successfully sent"; 
  ?&gt;
  </code></pre>
  
  <p>Now if i am using variable in body of message, the message is not sent but if i use static message the message is getting delivered to the number.
  The static message doesnt solve my purpose as i need the message to be sent to different person, the variable used ie $msg will have different name of people &amp; fetched from database.</p>
  
  <p>KINDLY SUGGEST.</p>