are you sure those variables are equal?
if ($ipmano == $prekip) {
echo"</br>veikia";
echo"$ipmano, $prekip";
echo "<div class='s'><a href=\"index.php?id=zaidimas&sid=$sid\">Atgal</a> | <a href=\"index.php?id=atsijungti&sid=$sid\">Atsijungti</a></div>";
}
// add this to see for yourself
else{ print $ipmano.'<br>'.$prekip }
also, when you say you receive no errors, do you have error reporting turned on?
error_reporting(-1);