php


getting error in diplaying PHONE NUMBERS from mysql databse USING PHP AND JSON


HERE I want to display the phone numbers of all users having same blood group,I am using GET method and webhosting 000webhost.com. I am getting the folowing output for the
url=http://retiform-power.000webhostapp.com/phone.php?Bldgrp=A+
The result is
{"result":[["8620881540"],["9432582115"],["9876512345"]]}
though some records exists in the database having A+ blood group.
Below is my code
<?php
require "conn.php";
if($_SERVER['REQUEST_METHOD']=='GET'){
$Bldgrp = $_GET['Bldgrp'];
$sql = "SELECT * FROM regstable WHERE Bldgrp ='A+'";
$res = mysqli_query($conn,$sql);
$result = array();
while($row = mysqli_fetch_array($res)){
array_push($result,
array(
$row[3]
));
}
echo json_encode(array("result"=>$result));
mysqli_close($conn);
}
?>

Related Links

How to work with unix file permissions in PHP
How to filter textbox using select value in jquery?
Error 500 After last then 1 minutes on Linux Apache
How to set different cache for the same url in litespeed vary cache?
Given date as parameter retrieve month and year
Can not use batching request in Google Classroom API
how to get openlitespeed webadmin password or reset litespeed admin panel password?
Laravel order of elemets on page
How string can be removed recurring characters and only stay unique chars in Php? [duplicate]
Change HTML for odd & even items in a foreach loop
How to display PHP variables in a proper HTML table
How to check which elements of an input array are already in database and which are not?
Load visual composer shortcode above page content
DQL Subquery Questions
PHP replace dots within backticks
Ending an element inside a while loop

Categories

HOME
php
artificial-intelligence
typelite
facebook-messenger
eclipse-plugin
plaid
website
whmcs
moodle-api
tibco
solution
smooks
jpa-2.0
mailgun
temperature
closures
cmake-gui
fido-u2f
kaggle
batch-rename
router
morris.js
hdmi
xenapp
netbios
osx-lion
shapeless
adminer
express-session
des
eclipse-gmf
django-smart-selects
task-parallel-library
microkernel
hdiv
dagger
fluid-mac-app-engine
daz3d
axis
wysihtml5
aws-kinesis-firehose
image-registration
android-webservice
deedle
dtd
emacs25
instafeedjs
allegro
ndk-build
data-management
zynq
dojo-build
wicked-pdf
uibinder
rails-engines
mathnet
jeditable
flipclock
jsr363
wikimedia-commons
json-spirit
in-app-billing
juniper-network-connect
ruby-on-rails-4.1
chicagoboss
apple
supercomputers
swagger-maven-plugin
tidyr
rubber
wicket-1.5
nesper
inequality
tabris
relationships
back
libgcc
air-native-extension
mft
acitree
notin
reentrancy
zend-pdf
live-wallpaper
taskkill
jdom
gamesalad
prefuse
opends
wcf-callbacks
android-2.1-eclair
iphone-sdk-4.3
main-method
inversion
accumulator
stretchblt
prism-2

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile