Hello, I am using two buttons that appear in the date and time selection dialog boxes. I have a counter.
I want to send user input value to php server. What to do for client side code?
Here is my code:
public class DineOutActivity extends Activity { private TextView mDateDisplay; private Button mPickDate; private int mYear; private int mMonth; private int mDay; private TextView mTimeDisplay; private Button mPickTime; private int mHour; private int mMinute; private int mAmPm; static final int TIME_DIALOG_ID=1; static final int DATE_DIALOG_ID = 0; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Spinner food = (Spinner) findViewById(R.id.spinner1); ArrayAdapter<CharSequence> foodadapter = ArrayAdapter.createFromResource( this, R.array.item_array, android.R.layout.simple_spinner_item); foodadapter.setDropDownViewResource(R.layout.spinner_layout); food.setAdapter(foodadapter); mDateDisplay = (TextView) findViewById(R.id.textView2); mTimeDisplay = (TextView) findViewById(R.id.textView4); mPickDate = (Button) findViewById(R.id.button2); mPickTime=(Button)findViewById(R.id.button3);
I use mPickDate as a button that opens in DatePickerDialog mPickTime as a button that when clicked opens the TimePicker One Spinner dialog box (spinner1) to get a list of items. mDateDisplay to show the date that the user edits after pressing DatePickerDialog. mTimeDisplay to show the time that the user edits after pressing the TimePickerDialog button.
I need user input string values ββDatePickerDialog, TimePickerDialog and spinner to send to the server as an HTTP message. Please tell me how to do this? I need a part code.
source share