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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -