php - how to pass id in url -


i trying send id in url , getting url this:

edittruck.php?truck_id=%2715%27 

i need :

edittruck.php?truck_id=15   idea please  

after want truck_id in edittruck.php page update.

yes, using single quotes.

i.e. edittruck.php?truck_id='27'

you can use this,

$truck_id = str_replace('%20',' ',$truck_id); 

now can pass $truck_id in single quotes also.

for getting $truck_id in 'edittruck.php' file use,

if(isset($_get['truck_id'])) {     $truck_id = $_get['truck_id']; } ?> 

or use $_request instead of $_get.


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -