Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. output += '<li><a href="#detail" onclick="affichedetail()">'+ field.nom + '</a></li><li>'+field.dist+'KM</li><li><img src="' + './photo/' + field.photo + '" height="100" width="100"</img></li><li>Latitude:' + field.lat + '</li><li>Longitude:' + field.longitude + '</li><li>Aprés:' + delai2 + '</li>';
  2.  
  3. // alert(var1);
  4. // alert(var2);
  5.  
  6.  
  7. });
  8. $('#mosquee').html(output).listview("refresh");
  9. // here we will handle errors and validation messages
  10. });
  11.  
  12. <?php
  13. $con=mysqli_connect("localhost","root","","priere");
  14. // Check connection
  15. if (mysqli_connect_errno())
  16. {
  17. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  18. }
  19. $result="";
  20. $valeur = $_GET['requete'];
  21. print("id="+$valeur);
  22. $result = mysqli_query($con,"SELECT lat,longitude FROM mosque where id=$valeur");
  23. while( $row = mysql_fetch_array( $result ) ) {
  24. $json[] = $row;
  25. }
  26. //json_encode( $json );
  27. echo json_encode($json);
  28. echo "<table border='1'>
  29. <tr>
  30. <th>lat</th>
  31. <th>Longitude</th>
  32. </tr>";
  33.  
  34. while($row = mysqli_fetch_array($result))
  35. {
  36. echo "<tr>";
  37. echo "<td>" . $row['lat'] . "</td>";
  38. echo "<td>" . $row['longitude'] . "</td>";
  39. echo "</tr>";
  40. }
  41. echo "</table>";
  42.  
  43.  
  44. mysqli_close($con);
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement