How to store the value of a variable to the database when a URL is requested ?

Recently I am working on a project in this i wrote the following codes on the arduino :

    #include <SoftwareSerial.h>
    SoftwareSerial GSM(2, 3); // RX, TX; connect TXD to RX and RXD to TX
    
    enum _parseState {
      PS_DETECT_MSG_TYPE,
    
      PS_IGNORING_COMMAND_ECHO,
    
      PS_HTTPACTION_TYPE,
      PS_HTTPACTION_RESULT,
      PS_HTTPACTION_LENGTH,
    
      PS_HTTPREAD_LENGTH,
      PS_HTTPREAD_CONTENT
    };
    int s=190;
    byte parseState = PS_DETECT_MSG_TYPE;
    char buffer[80];
    byte pos = 0;
    
    int contentLength = 0;
    
    void resetBuffer() {
      memset(buffer, 0, sizeof(buffer));
      pos = 0;
    }
    
    void sendGSM(const char* msg, int waitMs = 500) {
      GSM.println(msg);
      delay(waitMs);
      while(GSM.available()) {
        parseATText(GSM.read());
      }
    }
    
    void setup()
    {
      GSM.begin(9600);
      Serial.begin(9600);
      sendGSM("AT+SAPBR=3,1,\"APN\",\"vodafone\"");  
      sendGSM("AT+SAPBR=1,1",3000);
      sendGSM("AT+HTTPINIT");  
      sendGSM("AT+HTTPPARA=\"CID\",1");
      sendGSM("AT+HTTPPARA=\"URL\",\"http://masp203.000webhostapp.com/hinderset.php?speed=60\"");
      sendGSM("AT+HTTPACTION=0");
    }
    
    void loop()
    {  
      while(GSM.available()) {
        parseATText(GSM.read());
      }
    }
    
    void parseATText(byte b) {
    
      buffer[pos++] = b;
    
      if ( pos >= sizeof(buffer) )
        resetBuffer(); // just to be safe
    
      /*
       // Detailed debugging
       Serial.println();
       Serial.print("state = ");
       Serial.println(state);
       Serial.print("b = ");
       Serial.println(b);
       Serial.print("pos = ");
       Serial.println(pos);
       Serial.print("buffer = ");
       Serial.println(buffer);*/
    
      switch (parseState) {
      case PS_DETECT_MSG_TYPE: 
        {
          if ( b == '\n' )
            resetBuffer();
          else {        
            if ( pos == 3 && strcmp(buffer, "AT+") == 0 ) {
              parseState = PS_IGNORING_COMMAND_ECHO;
            }
            else if ( b == ':' ) {
              //Serial.print("Checking message type: ");
              //Serial.println(buffer);
    
              if ( strcmp(buffer, "+HTTPACTION:") == 0 ) {
                Serial.println("Received HTTPACTION");
                parseState = PS_HTTPACTION_TYPE;
              }
              else if ( strcmp(buffer, "+HTTPREAD:") == 0 ) {
                Serial.println("Received HTTPREAD");            
                parseState = PS_HTTPREAD_LENGTH;
              }
              resetBuffer();
            }
          }
        }
        break;
    
      case PS_IGNORING_COMMAND_ECHO:
        {
          if ( b == '\n' ) {
            Serial.print("Ignoring echo: ");
            Serial.println(buffer);
            parseState = PS_DETECT_MSG_TYPE;
            resetBuffer();
          }
        }
        break;
    
      case PS_HTTPACTION_TYPE:
        {
          if ( b == ',' ) {
            Serial.print("HTTPACTION type is ");
            Serial.println(buffer);
            parseState = PS_HTTPACTION_RESULT;
            resetBuffer();
          }
        }
        break;
    
      case PS_HTTPACTION_RESULT:
        {
          if ( b == ',' ) {
            Serial.print("HTTPACTION result is ");
            Serial.println(buffer);
            parseState = PS_HTTPACTION_LENGTH;
            resetBuffer();
          }
        }
        break;
    
      case PS_HTTPACTION_LENGTH:
        {
          if ( b == '\n' ) {
            Serial.print("HTTPACTION length is ");
            Serial.println(buffer);
            
            // now request content
            GSM.print("AT+HTTPREAD=0,");
            GSM.println(buffer);
            
            parseState = PS_DETECT_MSG_TYPE;
            resetBuffer();
          }
        }
        break;
    
      case PS_HTTPREAD_LENGTH:
        {
          if ( b == '\n' ) {
            contentLength = atoi(buffer);
            Serial.print("HTTPREAD length is ");
            Serial.println(contentLength);
            
            Serial.print("HTTPREAD content: ");
            
            parseState = PS_HTTPREAD_CONTENT;
            resetBuffer();
          }
        }
        break;
    
      case PS_HTTPREAD_CONTENT:
        {
          // for this demo I'm just showing the content bytes in the serial monitor
          Serial.write(b);
          
          contentLength--;
          
          if ( contentLength <= 0 ) {
    
            // all content bytes have now been read
    
            parseState = PS_DETECT_MSG_TYPE;
            resetBuffer();
          }
        }
        break;
      }
    }

in this I request a URL (http://masp203.000webhostapp.com/hinderset.php?speed=60)
from the Arduino UNO. When I request this URL, the value of speed (i.e in this case 60) will be stored to the database on the web host database.the corresponding PHP code for doing this is :

    <?php
    $servername = "localhost";
    $username = "i_hin*******";
    $password = "1************";
    $dbname = "id**********";
    
    // Create connection
    $conn = mysqli_connect($servername, $username, $password, $dbname);
    // Check connection
    if (!$conn) {
        die("Connection failed: " . mysqli_connect_error());
    }
    
    $sql = "INSERT INTO hind (speed) VALUES ('".mysqli_real_escape_string($conn,$_GET['speed'])."')";
    
    if (mysqli_query($conn, $sql)) {
        echo "New record created successfully";
    } else {
        echo "Error: " . $sql . "
" . mysqli_error($conn);
    }
    
    mysqli_close($conn);
    ?>

It works well and stores the value (60) to the database. Now I need to pass a parameter from the Arduino to store its value to the database: i.e in my Arduino code I have a variable swhose value(in this case it is 190) I need to store on to the database when I request a URL. I tried replacing the 60 in the above URL with variable s as http://masp203.000webhostapp.com/hinderset.php?speed=s (i thought it would be ultimately will be like this : http://masp203.000webhostapp.com/hinderset.php?speed=190) But when I check the database I saw the corresponding entry filled with ‘0’.I think it tries to enter s into database and not its value.

Can anyone tell me why I couldn’t store it and how I can do that.here i found codes for the same question but it uses some other method and i could not understand it.Pease help me as soon as possible

Can anyone tell me why I couldn’t store it

Because you sent the letter s, not the contents of the variable whose name is s.

      char url[80];
      sprintf(url, "AT+HTTPPARA=\"URL\",\"http://masp203.000webhostapp.com/hinderset.php?speed=%d\"", s);
      sendGSM(url);

thank you paulS it works !!!!thank you so much!!! :) :) :) :)