gather 2 parameters and send, POST wininet [Help]

I have a problem I need to post two parameters via wininet so I can save in a mysql database. So I was thinking how do I string two parameters. My code goes like this

1
2
3
4
5
6
7
Void sendinfo()
  {
      string fname = "kazan";
      string lname = "alwasan";
    
    //send data with wininet. Other code goes here.
    }


Or do I just do it like this

1
2
3
4
5
Void sendInfo()
  {
      string data = "&firstname=kazan&lastname=alwasan";
     //send data with wininet
}


Or do I just concartenate it like this
1
2
3
4
5
6
7
8
Void sendinfo()
{
string fname = "kazan";
string lname = "alwasan";

data = fname + lname;
// send POST data with wininet
}

Now I have a problem, I am learning to do this. I am In need of a source code, how do I simulate a simple wininet request to send data to a php file so I can save in a mysql database later. I only need a c++ working example.

Please I wonna learn, just help me out
Last edited on
Concatenate like in your third example. However, note that you may need to put a space between these two values.
Topic archived. No new replies allowed.