TelPlaza.net

Recent Posts

Pages: 1 ... 7 8 [9] 10
81
Android / Re: Download Open GAPPS (Google Apps)
« Last post by Sobhana123 on December 14, 2017, 10:12:04 AM »
I am also using android phone but i don't how to download google apps.
82
Which smartphone is best for me? / Re: Which Cell Phone Should you Get?
« Last post by Muneera123 on December 13, 2017, 01:36:41 PM »
Samsung Galaxy note 8 phone is good .chaging also good  ,big sreen also front and back camera also nice anyways phone is very nice still i using that mobille ...
How to get ISO 27001 Certification in Kuwait
83
General News & Discussion / Re: Funny iPhone 7 :)
« Last post by Laxmi123 on December 13, 2017, 12:10:44 PM »
don't  know about this iphone7 can u please explain that features.
84
General News & Discussion / Re: Hitler gets angry about iPhone 4S
« Last post by certvalue111 on December 12, 2017, 06:55:05 AM »
hi there... really nice video just loved it thanks for sharing :)
85
Which smartphone is best for me? / Re: Which Cell Phone Should you Get?
« Last post by shilpa111 on December 09, 2017, 04:50:36 PM »
hi
All mobile  are nice,i recently red mi  note4 is good.
86
Android Games / Re: Plants War
« Last post by Sobhana123 on December 05, 2017, 06:11:32 AM »
hii all i hate this android games .
87
General News & Discussion / Re: Hitler gets angry about iPhone 4S
« Last post by Certvalue on September 07, 2017, 08:56:32 PM »
Super video, very funny while watching.
88
iOS / iOS 10 Stock Wallpapers Full HD Download
« Last post by TelVerde on August 19, 2017, 03:55:04 PM »
iOS 10 wallpaper iPhone7



iOS 10 wallpaper iPad



89
Android / Android - Connecting to MYSQL (Get Method)
« Last post by TelVerde on August 19, 2017, 03:35:47 PM »
Connecting Via Get Method
There are two ways to connect to MYSQL via PHP page. The first one is called Get method. We will use HttpGet and HttpClient class to connect.
Code: [Select]
URL url =new URL(link);HttpClient client =newDefaultHttpClient();HttpGet request =newHttpGet();

request.setURI(new URI(link));
[/SIZE]

...call execute method of HttpClient class and receive it in a HttpResponse object.
Code: [Select]
HttpResponse response = client.execute(request);

BufferedReader in = new BufferedReader
(new InputStreamReader(response.getEntity().getContent()));
[/SIZE]

Connecting Via Post Method

Code: [Select]
URL url = new URL(link);

String data  = URLEncoder.encode("username", "UTF-8")
+ "=" + URLEncoder.encode(username, "UTF-8");
data += "&" + URLEncoder.encode("password", "UTF-8")
+ "=" + URLEncoder.encode(password, "UTF-8");
URLConnection conn = url.openConnection();
[/SIZE]

Code: [Select]
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());

wr.write( data );
BufferedReader reader = new BufferedReader(new
InputStreamReader(conn.getInputStream()));    

The php page has been given below which takes parameters by post method.[/SIZE]

Code: [Select]

   $con=mysqli_connect("mysql10.000webhost.com","username","password","db_name");

   if (mysqli_connect_errno($con)) {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
   }
   
   $username = $_POST['username'];
   $password = $_POST['password'];
   $result = mysqli_query($con,"SELECT Role FROM table1 where
   Username='$username' and Password='$password'");
   $row = mysqli_fetch_array($result);
   $data = $row[0];

   if($data){
      echo $data;
   }
   
   mysqli_close($con);
?>
[/SIZE]


More info and complete Android - PHP/MYSQL tutorial



--
Ref: www.tutorialspoint.com/android/android_php_mysql.htm
90
10+ for design (Full-Metal Unibody Design) and Nexus 6P features more powerful Snapdragon 810 octa-core processor with 3GB of RAM.
[MEDIA=youtube]-ngRVUKJ58M[/MEDIA]

Huawei Nexus 6P Features

ROMs, Themes & Apps
Pages: 1 ... 7 8 [9] 10