PHP - Need Tips
so i want to create a new page that will display only my data..on that page user will only see the leave details(marked in red line) and able to print it..which code should i use..so this is my code from the main page
<div id="box" valign="top"> <h3> <strong>Leave Application Details</strong>  </h3> <br><br> <FORM name ="printbutton" method="post" align="left" action="index.php?view=print"> <Input type = "Submit" Name = "Submit1" Class="button" VALUE = "Print Leave Details"> <table width="80%" align="center" > <thead> <tr> <th width="700px" align="left">Name</a></th> <th width="500px" align="center"></a>Application</th> <th width="500px" align="center"></a>Date</th> <th width="500x" align="right"></a>Reason</th> </tr> </thead> <tbody> <? /*echo "branch:".$branch.'<br />'; echo "leavemonth:".$leavemonth.'<br />'; echo "leaveyear:".$leaveyear.'<br />';*/ //-------------------------------------------------- if ($leavemonth =='' || $leaveyear =='' || $branch == '') { // one value missing, so don't display } else { // start display data $rs = mysql_query( " call vwleavereport('$leavemonth', '$leaveyear', $branchid, 0);"); $query="SELECT *, MONTH(tblleaveapplication.DateFrom) as DFMonth, MONTH(tblleaveapplication.DateTo) as DTMonth, YEAR(tblleaveapplication.DateFrom) as DFYear FROM `tblleaveapplication` LEFT JOIN `tblemployee` ON tblleaveapplication.employeeid = tblemployee.id WHERE WorkGroupID = '".$branch."' AND ( (MONTH(tblleaveapplication.DateFrom)=".$leavemonth." AND YEAR(tblleaveapplication.DateFrom)=".$leaveyear.") OR (MONTH(tblleaveapplication.DateTo)=".$leavemonth." AND YEAR(tblleaveapplication.DateFrom)=".$leaveyear.") ) "; $result = mysql_query($query); while($row=mysql_fetch_array($result)) { echo '<tr>'; echo '<td>'.$row['EmployeeName'].'</td>'; echo '<td>'.$row['DateFrom'].'</td>'; echo '<td>'.$row['DateTo'].'</td>'; echo '<td>'.$row['Purpose'].'</td>'; echo '</tr>'; } } ?> </table> Similar Tutorialsok 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 Code: [Select] <? 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>  </font>"; } else { echo "<font color='#4A708B' face='arial' ><img src=".$logo_dir."/".$logopath." width=\"15%\"></img>  </font>"; } ?> <br> <? } echo "<br>"; } } ?> Hi, A web site designed about 5 years ago is doing well in search engines but I am designing a new web site using PHP, CSS and MySQL. The old site was HTML and CSS. Do you have any design tips for Search Engines Optimisation when using PHP and MySQL? --- I will start coding soon, so all tips will be used. Thanks, Matt. |