Question: Basically I have set up some members on the database side, I have also done a registration form where it posts the data to the database, but the problem I'm having is that my program will not start the activity. When I comment out the httppost parts it works, so I believe that my problem is all to do with the PHP file, but have posted the java code I have done. In another question I will post the PHP code.

```
try
{
    httpclient = new default HttpClient();
    httppost = new HttpPost("");
    nameValuePair = new arrayList < NameValuePair > (1);
    nameValuePair . add(new BasicNameValuePair("email", email . getText() . toString() . trim()));
    nameValuePair . add(new BasicNameValuePair("password", password . getText() . toString() . trim()));
    httppost . setEntity(new UrlEncodedF or mEntity(nameValuePair));
    response = httpclient . execute(httppost);
    ResponseHandler < String > responseHandler = new BasicResponseHandler();
     final Stringresponse = httpclient . execute(httppost, responseHandler);
    loginErrorMsg . setText("" + response);

    if(response . equalsIgnorecase ("Log in Successful"))
    {
        startActivity(new Intent(LoginActivity . this, HomescreenActivity . class ));
    }
}
catch(Exceptione)
{
    e.printStackTrace();
}

```

Answer: 
The simple way to have key/value in a SimpleComboBox is to use a ListStore with type BaseModel. BaseModel allows you to save data as key/value like following:

```
SimpleComboBox combo = new SimpleComboBox();
ListStore<BaseModel> store = new ListStore<BaseModel>();

combo.setStore(store);
combo.setDisplayField("name");
// complete the SimpleComboBox properties here.

// Now, we will create data sample for the answer
BaseModel model = new BaseModel();
model.set("id", 1);
model.set("name", "Java");
store.add(model);

BaseModel model = new BaseModel();
model.set("id", 2);
model.set("name", "PHP");
store.add(model);

```

as you can see from the code snippet, BaseModel stores data as key/value pairs, so you can easily get the selected element from the SimpleComboBox like:

```
BaseModel selectedModel = (BaseModel) combo.getValue();
String techName = selectedModel.get("name"); // return value of key name

```
```
// MySimpleComboBox extends SimpleComboBox
public MySimpleComboBox(){
    super(new ListStore<Person>(new ModelKeyProvider<Person>() {
        @Override
        public String getKey(Person item) {
            return item.id();
        }
    }), new LabelProvider<Person>() {
        @Override
        public String getLabel(Person item) {
            return item.toString();
        }
    });
}

```

I did that once I think it is what your looking for (or what you were looking for).