Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. public void onClick(View v)
  2. {
  3. Toast.makeText(SingleContactActivity.this, "Hej", Toast.LENGTH_SHORT).show();
  4.  
  5. String url = "http://192.168.1.41:8383/android_butler/fjernnu.php";
  6. HttpClient client = new DefaultHttpClient();
  7.  
  8. try {
  9. client.execute(new HttpGet(url));
  10. } catch(IOException e) {
  11. //do something here
  12. }
  13.  
  14. <TextView android:id="@+id/name_label"
  15. android:layout_width="fill_parent"
  16. android:layout_height="wrap_content"
  17. android:textSize="25dip"
  18. android:textStyle="bold"
  19. android:paddingTop="10dip"
  20. android:paddingBottom="10dip"
  21. android:onClick="onClick"
  22. android:clickable="true"
  23. android:textColor="#43bd00"/>
  24.  
  25. <?php
  26. include('db.php');
  27. sqlsrv_query($conn,"DELETE * FROM butler");
  28.  
  29.  
  30. sqlsrv_close($conn);
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement