Jump to content

can anyone help- need tips on if..else


scarezekiel

Recommended Posts

ok so on my website which u can check out..its on www.aep.com.my .. at the first page..scroll down till u see upcoming events..click on page 2.. then click partner & sponsor button.. a page with logos will appear..so i only need to link on the DANAJAMIN logo, which ive done already. Other logos' links should be remove..but the logo remains there..please help me..

 

Another thing is i need the logos to appear horizontally instead of vertically..

 

so this is my source code

 


<?
if(isset($_GET[ttid])) {
$ttid = $_GET[ttid];
}

$connection=mysql_connect("$server", "$username", "$password")
or die("Could not establish connection");
mysql_select_db($database_name, $connection)
or die ("Could not select database");


$query = "select master_event.* , 
(DATE_FORMAT(event_datefrom, '%d %M %Y')) as datefrom,
(DATE_FORMAT(event_dateto, '%d %M %Y')) as dateto,
ucase(event_name) as eventname
from master_event
where master_event.event_id = '$ttid '";
$result=mysql_query($query);
while($row = mysql_fetch_array($result)){
$eventname = $row['eventname'];
$eventdesc = $row['event_desc'];
$companydescription = $row['company_description'];
$eventvenue = $row['event_venue'];
$eventfee = $row['event_fee'];
$datefrom = $row['datefrom'];
$dateto = $row['dateto'];

echo "<font color='#000000'  face='arial' ><b> $eventname </b> </font> <br>";
echo "<font color='#000000'  face='arial' ><i>Date</i> : $datefrom - $dateto <br>";
echo "<i>Venue</i> : $eventvenue <br>";

$querypstype = "SELECT DISTINCT master_pstype.pstype_id,  pstype_desc FROM master_pstype
		INNER JOIN master_psevent ON master_psevent.pstype_id= master_pstype.pstype_id
		where master_psevent.event_id = '$ttid'
		ORDER BY pstype_id";

$resultpstype=mysql_query($querypstype);
while($rowpstype = mysql_fetch_array($resultpstype)){
$pstypeid = $rowpstype['pstype_id'];
$pstypedesc = $rowpstype['pstype_desc'];
echo "<br><font color='#8B3A3A' size='1' face='georgia' ><b><i>$pstypedesc</i></b></font> <br>";

$queryps = "SELECT master_psevent.*, pstype_desc, company_name, company_link, company_description, logo_filename FROM master_psevent
		LEFT JOIN master_pstype ON master_psevent.pstype_id = master_pstype.pstype_id
		LEFT JOIN master_ps ON master_ps.ps_id = master_psevent.ps_id
		WHERE master_psevent.event_id = '$ttid' and master_pstype.pstype_id= '$pstypeid' 
		ORDER BY pstype_desc,company_name ";

$resultps=mysql_query($queryps);
while($rowps = mysql_fetch_array($resultps)){
$companyname = $rowps['company_name'];
$companyid = $rowps['ps_id'];
$companylinkori = $rowps['company_link'];
$companydescription = $rowps['company_description'];

if ($companyid==33){

	$companylink = "http://www.aep.com.my/index.php?view=describe";

} else {
		if ($companylinkori <> "") {
			//$companylink = "http://".$rowps['company_link'];
			$companylink = "http://www.aep.com.my/index.php?view=".$companyid;
		}
		else
		{
			$companylink = "";
		}		
}


$logopath = $rowps['logo_filename']; 

if ($companylink <> ""){
echo "<font color='#4A708B'  face='arial' ><a href=$companylink style=\"color:white;text-decoration: none; \" target='new'><img src=".$logo_dir."/".$logopath." width=\"15%\"></img></a>&nbsp&nbsp</font>";

}
else
{
echo "<font color='#4A708B'  face='arial' ><img src=".$logo_dir."/".$logopath." width=\"15%\"></img>&nbsp&nbsp</font>";
}
?>

<br>
<?

}
echo "<br>";

}

}



?>


Link to comment
https://forums.phpfreaks.com/topic/259319-can-anyone-help-need-tips-on-ifelse/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.