Advertisement
colmulhall

Untitled

Apr 4th, 2014
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.15 KB | None | 0 0
  1.                         // Get the data from the text boxes and spinners
  2.                 title = editTitle.getText().toString();
  3.                 desc = editDesc.getText().toString();
  4.                 date = editDate.getYear()+"-"+editDate.getMonth()+"-"+editDate.getDayOfMonth();
  5.                 location = String.valueOf(locations.getSelectedItem());
  6.                 category = String.valueOf(categories.getSelectedItem());
  7.                 contact_link = editContact.getText().toString();
  8.            
  9.                     // Send the users entered parameters to the PHP script through POST
  10.             List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
  11.             nameValuePairs.add(new BasicNameValuePair("title", title));
  12.             nameValuePairs.add(new BasicNameValuePair("description", desc));
  13.             nameValuePairs.add(new BasicNameValuePair("date", date));
  14.             nameValuePairs.add(new BasicNameValuePair("location", location));
  15.             nameValuePairs.add(new BasicNameValuePair("category", category));
  16.             nameValuePairs.add(new BasicNameValuePair("contact_link", contact_link));
  17.            
  18.             // Send inputted data to the the PHP script
  19.             jsonStr = sh.makeServiceCall(submit_url, HandleConnections.POST, nameValuePairs);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement