i don't get this one. if i put it in phpmyadmin it works, but if i put in my php code it doesn't works!
this is the query:
select * from port where user_id = 31 and password = 'test'
this is the code:
<?php
include_once("obj.mysql.php");
$con = new connection;
$t1 = "port";
$v1 = "*";
$where = "user_id = " . $_POST["user_id"] . " and password = '";
$where .= htmlspecialchars(addslashes($_POST["old_pw"])) . "'";
$con->select($t1, $v1, $where);
?>
and obj.mysql.php
<?php
function select($tabel, $velden, $where) {
$sql = "select " . $velden . " from " . $tabel . " where " . $where;
echo $sql;
$a = mysql_query($sql, $this->con) or die(mysql_error());
if(@mysql_num_rows($a) == 0) {
$this->geen_rij = "1";
} else {
$this->resultaat = $a;
}
}
?>