Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-18-2013, 05:20 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › PHP v
« Previous 1 ... 25 26 27 28 29 ... 31 Next »

[Solved] Minta Bantuan(Urgent)

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Solved Minta Bantuan(Urgent)
05-01-2011, 07:07 PM (This post was last modified: 05-01-2011 07:11 PM by Joris.)
Post: #1
Joris Offline
./Devilz Officer
Posts: 240
Joined: Feb 2011
Reputation: 3
Minta Bantuan(Urgent)
Om2 semua...ane minta pencerahan-nya donk....
Ane kan buat aplikasi JAVA (Mobile) yg merequest data ke web...
Nah, masalah ane untuk ngebaca request dari JAVA kaya gini
Koding request di JAVA :
Code:
String url ="http://localhost/cek_data.php?id=1";

Nah nanti di PHP di terima :
PHP Code:
    //Pembacaan ID yg dikirim dari JAVA
    
if(isset($_GET['id'])){
    switch(
$_GET['id'])
    {
        case 
1: Simpan(); //Function yg ane buat untuk melakukan cek apabila ID yg dikirim = 1
        
break;
    }    
} 

<Coding di atas udah berhasil>

-------------------------------------------------------------------------------------
Yang ane mau tanyakan, apabila saya mau request dari JAVA (Mobile) dengan parameter url :
Code:
String url ="http://localhost/cek_data.php?id=1&jwb=YES";

Coding di PHP-nya untuk menerima ID-nya dan Jawaban "YES" dari JAVA seperti apa???

Mohon bantuannya ya om2........
Find all posts by this user
Quote this message in a reply
05-01-2011, 09:03 PM (This post was last modified: 05-01-2011 09:04 PM by /dev/null.)
Post: #2
/dev/null Away
./Devilz Officer
Posts: 77
Joined: Apr 2011
Reputation: 5
RE: Minta Bantuan(Urgent)
PHP Code:
<?php

$jawab 
= "default"; // isi variable $jawab dengan nilai default 
if(isset($_GET['jwb'])) $jawab = $_GET['jwb']; // kalau ada request $_GET['jwb'] maka simpan pada variable $jawab

if($jawab == 'YES'){
  
// YES
}
else{
 
// bla bla
}

?>
Find all posts by this user
Quote this message in a reply
05-01-2011, 10:53 PM
Post: #3
Joris Offline
./Devilz Officer
Posts: 240
Joined: Feb 2011
Reputation: 3
RE: Minta Bantuan(Urgent)
(05-01-2011 09:03 PM)/dev/null Wrote:  
PHP Code:
<?php

$jawab 
= "default"; // isi variable $jawab dengan nilai default 
if(isset($_GET['jwb'])) $jawab = $_GET['jwb']; // kalau ada request $_GET['jwb'] maka simpan pada variable $jawab

if($jawab == 'YES'){
  
// YES
}
else{
 
// bla bla
}

?>

Okeh om......langsung dipindahkan ke TKP ane.......asikasik

Tengkyu om....ane send rep-nya ke om....smangatsmangat
Find all posts by this user
Quote this message in a reply
05-01-2011, 11:09 PM (This post was last modified: 05-03-2011 02:18 AM by AaEzha.)
Post: #4
AaEzha Away
nobody
***
Posts: 437
Joined: Feb 2010
Reputation: 13
RE: Minta Bantuan(Urgent)
atau bisa juga begini
PHP Code:
String url ="http://localhost/cek_data.php?id=1&jwb=YES"; 

kali aja bener ketawa
PHP Code:
$id=$_GET['id'];
$jwb=$_GET['jwb'];

if (
$id=='1' AND $jwb=='YES'){
 
// klo YES
  
}
  else{
 
// klo NO atau lainnya
  
} 
Visit this user's website Find all posts by this user
Quote this message in a reply
05-01-2011, 11:14 PM
Post: #5
Joris Offline
./Devilz Officer
Posts: 240
Joined: Feb 2011
Reputation: 3
RE: Minta Bantuan(Urgent)
(05-01-2011 11:09 PM)AaEzha Wrote:  atau bisa juga begini
PHP Code:
String url ="http://localhost/cek_data.php?id=1&jwb=YES"; 

kali aja bener ketawa
PHP Code:
$id=$_GET['id'];
$jwb=$_GET['jwb'];

if (
$id=='1' AND $act=='YES'){
 
// klo YES
  
}
  else{
 
// klo NO atau lainnya
  
} 

Tengkyu om momod....ditampung lagi ne bantuannya....asikasikasik
Ntar ane kirim rep-nya setelah ini.....santaisantai
Find all posts by this user
Quote this message in a reply
05-02-2011, 12:15 AM
Post: #6
AaEzha Away
nobody
***
Posts: 437
Joined: Feb 2010
Reputation: 13
RE: Minta Bantuan(Urgent)
no problemo. halah :P
Visit this user's website Find all posts by this user
Quote this message in a reply
 Reputed by :  Joris(+1)
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Solved] Mohon Bantuan'y yah chiboga 13 294 03-25-2013 08:41 PM
Last Post: DC_Julianz
  minta revisi kalo ada salah #CMIIW masih belajar 14 274 03-22-2013 07:21 PM
Last Post: anbu
  [Ask] mohon bantuan buat aplikasi keuangan/kas menggunakan php cukong 5 535 05-16-2012 04:49 PM
Last Post: ditatompel
  [Solved] bantuan php starz³ 11 752 03-07-2012 09:51 PM
Last Post: kakaniko
  [Ask] Mohon Bantuan Mengenai Web PHP zard22 11 574 02-25-2012 12:15 PM
Last Post: rendy_bomber
  [Tutor] Sorting mysql php dengan bantuan "ABS" suicidal 4 749 01-24-2012 04:22 PM
Last Post: chiboga
Sad [Solved] Butuh bantuan.. (pliszz) starz³ 5 696 10-14-2011 07:05 PM
Last Post: starz³
  minta batuan cincau 16 1,614 06-05-2011 07:20 AM
Last Post: darma
Star Minta Masukkan para SUHU semutdanlaba2 10 1,495 04-05-2011 10:28 AM
Last Post: xadpritox

Users Browsing

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-18-2013, 05:20 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE