Problem in HTTP POST method using SIM 900A


#1

I have problem in post method
I just trying to send data over online mysql database using post method here i used SIM-900A

Here is My code:----

#include <SoftwareSerial.h>

SoftwareSerial gprsSerial(3, 4);//rx, tx
int pan = 166;
void setup()
{
gprsSerial.begin(9600);
Serial.begin(9600);

Serial.println(“Config SIM900…”);
delay(3000);
Serial.println(“Done!..”);
gprsSerial.flush();
Serial.flush();

gprsSerial.println(“AT+CGATT=1”);
delay(6000);
toSerial();

gprsSerial.println(“AT+SAPBR=3,1,“CONTYPE”,“GPRS””);
delay(4000);
toSerial();

gprsSerial.println(“AT+SAPBR=3,1,“APN”,“internet””);
delay(4000);
toSerial();

gprsSerial.println(“AT+SAPBR=1,1”);
delay(2000);
toSerial();

gprsSerial.println(“AT+HTTPINIT”);
delay(2000);
toSerial();
}

void loop()
{
delay(2000);
gprsSerial.print("AT+HTTPPARA=“URL”,“xxxx/xxx/insert.php?aurdino=”);

gprsSerial.print("AT+HTTPPARA=Content-Type:application/x-www-form-urlencoded");

gprsSerial.print(“AT+HTTPDATA=18,10000”);

gprsSerial.print(pan);
gprsSerial.println(""");
delay(6000);
toSerial();

gprsSerial.println(“AT+HTTPACTION=1”);
delay(6000);
toSerial();

gprsSerial.println(“AT+HTTPREAD”);
delay(3000);
toSerial();

gprsSerial.println(“AT+HTTPTERM”);
toSerial();
delay(5000);
}

void toSerial()
{
while(gprsSerial.available()!=0)
{
Serial.println(gprsSerial.readString());
}
}