is it beacause there are to many if else statement.??
please help.
<?
$connection = mysql_connect("domain","user","pass") or die('Could not connect to the database server');
$db = mysql_select_db("test", $connection) or die ("Unable to select database1");
$sql = "SELECT * FROM Listings WHERE id=$listing_id";
$sql_result = mysql_query($sql,$connection) or die ("Error: ".mysql_error()."<br /><br />".$sql);
$line = mysql_fetch_array($sql_result);
$original_page = $line["type"];
echo $original_page . "<br>";
if ($original_page=='Rental House')
{
$xml_page = "rental";
}else if ($original_page == "Rental Unit")
{
$xml_page = "rental";
}else if ($original_page == "Business")
{
$xml_page = "business";
}else if ($original_page == "Rural")
{
$xml_page = "rural";
}else if ($original_page == "Land Commercial")
{
$xml_page = "land_commercial";
}else if ($original_page == "Land Residential")
{
$xml_page = "land";
}else if ($original_page == "Land Estates")
{
$xml_page = "land";
}else if ($original_page == "Land")
{
$xml_page = "land";
}else if ($original_page == "Riverfront Land")
{
$xml_page = "land";
}else
{
$xml_page = "residential";
}
echo $xml_page . "<br>";
if ($chkRE == "1")
{
?>
<script language="JavaScript" for="window" event="onload()">
window.open("xml_scripts/xml_script_<? echo $xml_page ?>.php?property_id=<? echo $listing_id ?>", "myannouncer", "scrollbars=no,resizable=no,height=230,width=170")
</script>
<?
}
$count = 0;
while($count <=5)
{
if ($line['re_visibility'] == 1 )
{
?>
pass 1
<?
} else {
?>
pass2
<?
}
}
$count = $count++;
echo "end";
?>