G
gmmm
Guest
i have a database which stores md5 hashes with pastes.
id is the md5 hash. i'm trying to use the id to call up the paste.
can anyone explain to me why this portion of the script will not echo any of the values?
$id = $_GET['id'];
$result = mysql_query('SELECT * FROM `Pastes` WHERE `Code` = \'%$id%\'');
$row = mysql_fetch_row($result);
echo $row[0];
echo $row[1];
echo $row[2];
id is the md5 hash. i'm trying to use the id to call up the paste.
can anyone explain to me why this portion of the script will not echo any of the values?
$id = $_GET['id'];
$result = mysql_query('SELECT * FROM `Pastes` WHERE `Code` = \'%$id%\'');
$row = mysql_fetch_row($result);
echo $row[0];
echo $row[1];
echo $row[2];