Page 1 of 1

Want Another help

Posted: Fri Sep 05, 2008 5:29 am
by Rangana
I create page to display data get the data base and print the table. there have some data have more details when that item is click I want to get that details in drop down. how can i do that.

this is my implemented code

Code: Select all

$str="SELECT * FROM sitedata_basic WHERE SiteID LIKE '$Sw';";
$result=dbQuery($str);
$row = mysql_fetch_array($result);
 
print '<script language="JavaScript">';
//print 'window.moveTo(400,100);';
print 'self.focus();';
print '</script>';
if(!dbNumRows($result)==0){
    //print '<body>';
    print '<p></p>';
    print '<p><font face="Tahoma" color="Blue">';
    print '<h3 align="center"> Site Data </h3></P></font>';
    print '<p></p>';
    print '<p></p>';
    print '<table  align="center" hight="450"width="400" border="0" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" rules="rows" >';
    print '<tr>';
    print '<td> <b> Site Name </b> </td>';
    print '<td>  '.$row['SiteName'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>Site ID</b> </td>';
    //if ($row['SiteID']=="WA-CMB-0099"){
    print '<td> '.$row['SiteID'].' </td>';//}
    //else{
    //print '<td><a href> swew</a> </td>';
    //}
    print '</tr>';
    print '<tr>';
    print '<td> <b>RBM</b> </td>';
    print '<td> '.$row['RBM'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td><b> Province</b> </td>';
    print '<td>'.$row['Province'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>District</b> </td>';
    print '<td> '.$row['District'].' </td>';
    print '</tr>';
    print '<tr >';
    print '<td > &nbsp;</b> </td>';
    
    print '</tr>';
    print '<tr>';
    print '<td> <b> Site Address </b> </td>';
    print '<td> '.$row['SiteAddress'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>Network capacity expansion - Phase</b> </td>';
    print '<td> '.$row['NC_expansion_ Phase'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>Site Priority</b> </td>';
    print '<td> '.$row['SitePriprity'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td><b> Site commisioned date</b> </td>';
    print '<td> '.$row['Site_commisioned_Date'].'</td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>Commercial Power provider</b> </td>';
    if ($row['Commercial_Power_Provider']=="CEB"){
print '<td> <a href="">'.$row['Commercial_Power_Provider'].'</a> </td>'; [color=#FF0000] I want to check that code to  get drop down more details[/color]
        }else{
    print '<td> <a href="">'.$row['Commercial_Power_Provider'].'</a> </td>';
    }
    print '</tr>';
    print '<tr>';
    print '<td> <b>Back up Power provider</b> </td>';
    print '<td> '.$row['Backup_Power_Provider'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>Site owner</b> </td>';
    print '<td> '.$row['Site_Owner'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>Regionel Manager</b> </td>';
    print '<td> '.$row['Regionel_Manager'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>Engineer</b> </td>';
    print '<td> '.$row['Engineer'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>Assistant Engineer</b> </td>';
    print '<td> '.$row['Assistant_Enginee'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>Technical Officer</b> </td>';
    print '<td> '.$row['Technical_Officer'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>BSC Code</b> </td>';
    print '<td> '.$row['BSC_Code'].' </td>';
    print '</tr>';
    print '<tr>';
    print '<td> <b>BSC Owner</b> </td>';
    print '<td> '.$row['BSC_Owner'].' </td>';
    print '</tr>';
    print '</table>';

Re: Want Another help

Posted: Fri Sep 05, 2008 6:00 am
by zplits
Hi there. Can you please edit your post and include your code in the ....
Just to make it more clear to other people. Just an advice though. :)

Re: Want Another help

Posted: Fri Sep 05, 2008 6:13 am
by jayshields
You'll probably need to use the <select> tag.