php


How to display multi selection value in URL Query param?


I have created multi selection drop down in php page.Upon selecting one or more than one item in the lists will be passed to GET method to get values.
$user=$_GET['user'];
So the Query param in the page URL be like http:\\localhost\sample.php?users%5B%5D=nithya&users%5B%5D=nandha
Instead can I get like this http:\\localhost\sample.php?users=[nithya,nandha]? or any other readable way?
$users=array('Any','nithya','nandha','bala');
printf('<select multiple size="12" name="user[]">');
printf("<option value='Any'%s>Any</option>", in_array('Any', $users) ? ' selected' : '');
foreach ($users as $userName) {
printf("<option value='%s'%s>%s</option>", $userName, in_array($userName, $users) ? ' selected' : '', $userName);
}
}
printf("</select>");

Related Links

How to destroy the APC cache in YII
.val() not capturing the textbox value when button is clicked
PHP calling in more than 1 Tweet
PHPExcel - How to apply borders to dynamic range of cells loaded from mysql data
CodeIgniter Active record update not working
Creating MySQL leaderboard
JSON_BIGINT_AS_STRING removed in php 5.5?
Calling a Model Function in View?
PHP Regex: Extracting content from piped curly braces
Merge these array values into a new array?
Compare directory contents to database column in Joomla
How to access the html contents in the php code segment within the same php file?
How to change the index name of array
New line chr in twitter feed breaks JSONP
FFmpeg failed to transcode - Error while opening encoder for output stream
need ideas for remote authentication (Wordpress) [closed]

Categories

HOME
google-chrome
blast
shinyapps
clearcase
applescript
compilation
openlayers-3
gallery
flurry
drag-and-drop
gprs
phpmqtt
u-boot
graphql-js
selection
xades4j
documentum
google-awareness
sonata
mailgun
twisted
scala-ide
cmake-gui
workday
connection-refused
generator
acl
pyopencl
vuforia
function-points
nurbs
web-push
bobo-browse.net
ninject
guice
d3.js-v4
toad
windows2012
plantuml
ms-media-foundation
amazon-kms
keyboard-layout
nanogallery
macports
hidden-markov-models
linq.js
best-buy-api
1wire
web-inspector
reverse-dns
zend-form
docker-ucp
ipp-protocol
absolute
qvtkwidget
scala-breeze
sharpdx
redisson
aurelia-fetch-client
swiperefreshlayout
msxml
ltrace
java-2d
xmlbeans
xcode8-beta4
apple-configurator
urbit
preferenceactivity
taco
enunciate
boost-proto
smart-tv
mixins
roxygen2
modern.ie
bootstrap-wysiwyg
org-babel
karma-coverage
textscan
physicsjs
ocmockito
mxe
incron
fat32
device-admin
xml-signature
nesper
oracle-adf-mobile
loginview
csslint
rails-api
thruway
bittorrent-sync
meteorite
particle-swarm
spring-security-acl
form-for
indesign-server
days
lynx
xalan
stretch
word-frequency
jzmq
netstream
wiktionary
kolite
memory-pool
glx
firefly-mv
django-pagination
ninject-interception
oracle-pro-c
ppc
tacit-programming
icon-language
activex-exe
gui-designer
chronic

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App