Hi!
My problem is at the end of script. When "if (!empty($bensii n_2["id"]))" is
emtpty (id doesn't exist) then else doesn't echo. Maybe the problem is in
html code?
{
$peavik=("SELEC T * FROM soidup_info order by id");
$paevik = mysql_query($pe avik);
while($paevik_2 = mysql_fetch_arr ay($paevik))
{echo"
<table border=1 width=100% >
<tr>
<td width=81>"; ?><A
onclick="window .open('xxx.php? raha=<? echo $paevik_2["id"];
?>','','width=4 80,height=190,s crollbars=no')"
href="javascrip t:;"><span class=link><? echo" ".date("d-m-Y",
strtotime($paev ik_2["kuup"]))." ";?></span></td>
<? echo"
<td width=250>".$pa evik_2["marsruut"]."</td>
<td width=200>".$pa evik_2["pohjus"]."</td>
<td width=153>".$pa evik_2["juht"]."</td>
<td width=80 align=center>". $paevik_2["alg"]."</td>
<td width=80 align=center>". $paevik_2["lopp"]."</td>";
$bents=("SELECT * FROM soidup_bensiin where u_id=".$paevik_ 2["id"]."");
$bensiin = mysql_query($be nts);
while($bensiin_ 2 = mysql_fetch_arr ay($bensiin)) {
if (!empty($bensii n_2["id"]))
{
echo"<td align=center>". $bensiin_2["kogus"]."L</td></tr>"; }
else {echo" <td align=center>po le midagi</td </tr>"; }
}
}
}
My problem is at the end of script. When "if (!empty($bensii n_2["id"]))" is
emtpty (id doesn't exist) then else doesn't echo. Maybe the problem is in
html code?
{
$peavik=("SELEC T * FROM soidup_info order by id");
$paevik = mysql_query($pe avik);
while($paevik_2 = mysql_fetch_arr ay($paevik))
{echo"
<table border=1 width=100% >
<tr>
<td width=81>"; ?><A
onclick="window .open('xxx.php? raha=<? echo $paevik_2["id"];
?>','','width=4 80,height=190,s crollbars=no')"
href="javascrip t:;"><span class=link><? echo" ".date("d-m-Y",
strtotime($paev ik_2["kuup"]))." ";?></span></td>
<? echo"
<td width=250>".$pa evik_2["marsruut"]."</td>
<td width=200>".$pa evik_2["pohjus"]."</td>
<td width=153>".$pa evik_2["juht"]."</td>
<td width=80 align=center>". $paevik_2["alg"]."</td>
<td width=80 align=center>". $paevik_2["lopp"]."</td>";
$bents=("SELECT * FROM soidup_bensiin where u_id=".$paevik_ 2["id"]."");
$bensiin = mysql_query($be nts);
while($bensiin_ 2 = mysql_fetch_arr ay($bensiin)) {
if (!empty($bensii n_2["id"]))
{
echo"<td align=center>". $bensiin_2["kogus"]."L</td></tr>"; }
else {echo" <td align=center>po le midagi</td </tr>"; }
}
}
}
Comment