DAMN }else{
Posted: Tue Sep 10, 2002 11:46 pm
I am having problems with my ELSEIF statement (it isn't printing what it should when $sid is != to $sid). The IF is working fine but here check it out (thanks in advance):
Code: Select all
<?php
if($sid == $sid):
$sql = mysql_query("SELECT * FROM shows WHERE sid = '$sid' ORDER BY sid DESC LIMIT 1");
while($row=mysql_fetch_array($sql)) {
$sid = $rowї"sid"];
$sdfdb = $rowї"sdfdb"];
$show_date = $rowї"show_date"];
$bandaide_band = $rowї"bandaide_band"];
$other_bands = $rowї"other_bands"];
$venue = $rowї"venue"];
$city = $rowї"city"];
$state = $rowї"state"];
$time = $rowї"time"];
$price = $rowї"price"];
echo "<table width="100%" border="0" align="center">";
echo "<tr><td width="30%">Date</td><td width="30%">$show_date</td></tr>";
echo "<tr><td width="30%">Band+aide band</td><td width="30%">$bandaide_band</td></tr>";
echo "<tr><td width="30%">Other bands</td><td width="30%">$other_bands</td></tr>";
echo "<tr><td width="30%">Venue</td><td width="30%">$venue</td></tr>";
echo "<tr><td width="30%">City</td><td width="30%">$city</td></tr>";
echo "<tr><td width="30%">State</td><td width="30%">$state</td></tr>";
echo "<tr><td width="30%">Time</td><td width="30%">$time</td></tr>";
echo "<tr><td width="30%">Price</td><td width="30%">$price</td></tr>";
}
?>
<tr><td width="30%"></td><td width="30%"><br><a href="javascript:;" onClick="printshow('printshow.php?sid=<?php echo "$sid" ?>','','scrollbars=yes,width=400,height=300')">Print
Show Info</a></td></tr>
</table>
<?
elseif($sid != $sid):
echo "<tr><td>Show ID is invalid. Go Back.</td></tr>";
echo "</table>";
endif;
?>