Hi, so i have this function where variable $mok is taken from another php file by submitting a form. I echoed $mok and it gets the right string, but it does not work in a query, because function does not show any rows. i know that something wrong is with a query but dont know what, maybe you guys can see what is wrong?
[php]function kat_mokykla(){
$mok=$_POST[‘mok’];
$q = mysql_query(“SELECT * FROM URL WHERE kategorija=’$mok’”) or die(mysql_error());
//header(“Location: test2.php”);
$num_rows = mysql_num_rows($q);
for($i=0; $i<$num_rows; $i++){
$url = mysql_result($q,$i,“url”);
echo “<a href=”$url">$url\n";
echo “
”;
}
}[/php]