jquery - PHP: How do I get the middle of my $_GET variable? -
i have $_get
variable combination of md5('currentdate')
+ id
+ encrypted random string. this, can secure url somehow.
example url:
create_pdf.php?goto=qredit&qrid=1e02b73e2b1cb88685499f38508cf6e84317e62166fc8586dfa4d1bc0e1742c08b ^^
i need middle of $_get['qrid']
variable, in case 43
. tried using substr()
don't desired result.
update: here's how yield $_get
variable.
<a href="create_pdf.php?goto=qredit&qrid=<?php echo md5($today).$_get['qrid'].md5($_get['qrid']); ?>" target="_blank" id="upload_button">-random whatnot-</a>
assuming first , second strings fixed 32 characters, try retrieve id value string:
// characters last 32 chracters, starting @ 32nd character $id = substr($_get['qrid'], 32, strlen($_get['qrid'])-64);
Comments
Post a Comment