Get Page ID from Address Bar With PHP -
i have photo gallery , i'm trying , show photo info php file , database. problem is, have photo id address bar, address:
http://localhost/fa/index.php?do=photo&a=showphoto&photoid=155
in link photo id 155
then, in php file tried this:
$photo_id = $_request["photoid"];
but it's not working.
how can photo id page address?
you should not utilize $_request
value request between post, , cookie data. can flaw site security.
to info url utilize data, in case $_get['photoid']
. display on screen utilize echo $_get['photoid']
.
you can dump info using print_r($_get)
, array of info dumped.
php
No comments:
Post a Comment