Hello,
I've got a problem:
I have a combination of an gtm and a php files.
I have a huge Photo database.
the file query.htm says:
<input type="text" name="qflits" size="50"><br><br>
and the php says:
function getrecords(){
$qflits = $_REQUEST['qflits'];
$sql = 'SELECT * FROM `foto`';
$sql1 = 'WHERE flits $qflits ';
$sqlend = 'LIMIT 0, 5 ';
echo $sql.$sql1.$sqlend. '<br>';
$db = mysql_pconnect('localhost');
if (!$db) {
echo 'error.<br>';
echo 'MySQL errormessage: ' . mysql_error();
exit;
}
mysql_select_db('foto');
$result = mysql_query($sql.$sql1.$sqlend);
if (!$result) {
echo 'Fout: SQL_error.' . mysql_error();
exit;
}
return $result;
}
when I give the value in the query.htm:
(qflits)
LIKE "%o"
he displays in PHP:
SELECT * FROM fotoWHERE flits LIKE \"%o\" LIMIT 0, 5
I don't want those backslashes.
I want to result
LIKE "%o"
how can I convert this??
Ralph