Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

displaying data returned from php/mysql in a java me application

Avatar of blossompark
blossomparkFlag for Ireland asked on
JavaJavaScriptPHP
3 Comments1 Solution1676 ViewsLast Modified:
Hi,
     i use a php file to return data to a java me mobile  phone application and i want to display this info in some sort of table as i do not like how it currently displays (see attachment) returned datai've seen some information regarding json  and am wondering if this is the way to go.... although it seems like overkill for what i want ...any advice appreciated...
thanks
<?php

// this contains MySQL connection info
include("dbinfo.php");

//this creates a variable containing the
// MySQL username and password for connection
$sql = mysql_connect(localhost, $user, $pass)
   or die('Connection error: ' . mysql_error());

//this opens a session to the database that
// will be written to  
mysql_select_db($db, $sql)
   or die('Database selection failed.');

//this section defines the query to be fired at the database table
$query = "SELECT mobileNum, lat, lng FROM LiveOnSystem";
//execute the query
$result = mysql_query($query, $sql);
while($row = mysql_fetch_array($result))
  {
  echo $row['mobileNum'] . " "  . $row['lat'] ." "  . $row['lng'];
 
echo " [NEXT JOB]  ";

  }



var_dump($result);
mysql_close($sql);
?>
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971Flag of Guadeloupe imageMultitechnician
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers