Want Another help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rangana
Forum Newbie
Posts: 6
Joined: Thu Sep 04, 2008 4:36 am

Want Another help

Post 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>';
Last edited by Rangana on Sun Sep 07, 2008 10:08 pm, edited 1 time in total.
User avatar
zplits
Forum Contributor
Posts: 158
Joined: Sun Aug 03, 2008 8:59 pm

Re: Want Another help

Post 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. :)
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: Want Another help

Post by jayshields »

You'll probably need to use the <select> tag.
Post Reply