-1

Hello I was having the php native hosting on my server as i update to php 7.0 my sms sending code stop working. url is perfectly working but some thing problem with my php code. I am using this code

<form name="call" method="post" action="/sms.php"  id="call" onsubmit="return validateForm()" enctype="multipart/form-data">
<input name="name" id="name" class="name" placeholder="Enter Your Name" type="text">                   
    <input name="email" id="email" class="email" placeholder="Enter Your Email" type="text">
    <input name="mobile" id="mobile" class="phone" placeholder="Enter Your Mobile" type="text">
    <input name="dob" id="dob" class="dob" placeholder="DD/MM/YYYY  (DOB)" type="text"><span class="red">**</span>   
    <textarea name="msg" rows="2" cols="20" id="msg" placeholder="Enter Your Message"></textarea>
    <input type="submit" onclick="return val()" name="submit" value="Send Enquiry" class="send">
</form>

PHP code is

<?php
if(isset($_POST['submit']))
{
    $a=$_POST['name'];
    $b=$_POST['email'];
    $c=$_POST['mobile'];
    $d=$_POST['dob'];
    $e=$_POST['msg'];   
    $que="INSERT INTO sms_act (name, email, mobile, dob, msg) VALUES ('$a','$b', '$c', '$d', '$e')";        
    mysql_query($que);  
    $mmsg="Thank%20you%20for%20visiting.%20Our%20Support%20team%20will%20contact%20you%20shortly.";     
    $URL="http://103.16.101.52/bulksms/bulksms?username=edsq-test&password=12345&type=0&dlr=1&destination=".$c."&source=CHANKY&message=".$mmsg;
    echo($URL);
    $rds=file_get_contents($URL);       
    $msg="Request Has Been Received";       
}?>

This single API is working in browser url. i think shifting to the higher version of php my Lower version is not working plz help to solve this. by this line mysql_query($que); Data is inserting in database but at the same time sms is not getting fire. sms sending code might have some corrections. plz help.

vicky
  • 1
  • 1
  • 1
    Possible duplicate of [Why shouldn't I use mysql\_\* functions in PHP?](https://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php) – iainn Jan 15 '18 at 09:06
  • Better use PDO to make query in PHP: http://php.net/manual/en/class.pdo.php – Vladimir Jan 15 '18 at 09:19

1 Answers1

1

You should not use mysql_query anymore, as this has been removed in PHP 7. Anyways, you should check your application for error reporting settings, as this must be reported anywhere...

Nico Haase
  • 11,420
  • 35
  • 43
  • 69