Jump to content

problem on my 2 drop down menu


pixeltrace

Recommended Posts

guys, i need help

 

please check

http://www.jobhirings.com/admean/client/view.php

dont mind about the error on top

my problem is with the 2 drop down menu

i dont know how to fix it but notice that in the drop down, instead of

displaying the actual value,  its displaying the error.

 

need help on this please, i haven't fixed this for 3 days already.

<?php

include($_SERVER['DOCUMENT_ROOT']."/admean/pagina/my_pagina_class.php");

				//for the sort drop down menu
				$type = (!empty($_GET['type']))?$_GET['type']:1;
				 {
				$order=array(1=>'client_name',2=>'clientid',3=>'date_joined');
				if (!empty($type)) $sort="ORDER by '".$order[$type]."'";
				} 
				//for the seq drop down menu
				$seq = (!empty($_GET['seq']))?$_GET['seq']:1;
				 {
				$order=array(1=>'ASC',2=>'DESC');
				if (!empty($seq)) $sort="ORDER by '".$order[$seq]."'";
				} 

$test = new JHpage;

$test->sql = "SELECT * FROM clients ".$sort." DESC"; // the (basic) sql statement (use the SQL whatever you like)
$result = $test->get_page_result(); // result set
$num_rows = $test->get_page_num_rows(); // number of records in result set 
$nav_links = $test->navigation(" | ", "currentStyle"); // the navigation links (define a CSS class selector for the current link)
$nav_info = $test->page_info(); // information about the number of records on page ("to" is the text between the number)
$simple_nav_links = $test->back_forward_link(true); // the navigation with only the back and forward links, use true to use images
$total_recs = $test->get_total_rows(); // the total number of records
?>

<table width="100" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="../images/spacer.gif" width="6" height="10"></td>
    <td><table width="216" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td align="left" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1"></td>
        <td width="214" valign="top"><table width="929" border="0" cellspacing="2" cellpadding="0">
            <tr>
              <td colspan="6"><table width="616" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="329" class="text6">
				<?php
				 echo "   total record found: " .$total_recs; ?></td>
                    <td width="287"> </td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="609"> </td>
                    <td width="100" align="right" class="text6">sort by :
<select name="sortby" onFocus="selectedIndex = 0" onChange="if( options[selectedIndex].value != '') document.location = options[selectedIndex].value" class="sorteventlist">
                          <option value="clientmngr.php">--Please Select--</option>
					  <option value="clientmngr.php?id=2&type=1" <?=($_GET['type']==1)?"selected":"" ?>>name</option>
                          <option value="clientmngr.php?id=2&type=2" <?=($_GET['type']==2)?"selected":"" ?>>client ID</option>
                          <option value="clientmngr.php?id=2&type=3" <?=($_GET['type']==3)?"selected":"" ?>>joined date</option>
                        </select>                    </td>
                    <td width="80" align="right" class="text6">sort by :
<select name="sortby" onFocus="selectedIndex = 0" onChange="if( options[selectedIndex].value != '') document.location = options[selectedIndex].value" class="sorteventlist">
                          <option value="clientmngr.php">--Please Select--</option>
					  <option value="clientmngr.php?id=2&seq=1" <?=($_GET['seq']==1)?"selected":"" ?>>ASC</option>
                          <option value="clientmngr.php?id=2&seq=2" <?=($_GET['seq']==2)?"selected":"" ?>>DESC</option>
                        </select>                    </td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              	<td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="60%"> </td>
                    <td width="39%" align="right"><!-- nav top -->
                        <?
				echo "<span class='link1'>".$nav_links."</span>";
				?>                    </td>
                    <td width="1%" align="right"><img src="images/spacer.gif" width="12" height="10" /></td>
                  </tr>
                </table></td>
            </tr>
            <tr>
              <td width="63" align="center" bgcolor="#83C2ED" class="text5">ID</td>
              <td width="283" align="center" valign="top" bgcolor="#83C2ED" class="text5">name</td>
              <td width="93" align="center" bgcolor="#83C2ED" class="text5">joined date </td>
              <td width="236" align="center" bgcolor="#83C2ED" class="text5">rate agreed </td>
              <td width="194" align="center" bgcolor="#83C2ED" class="text5">remark</td>
              <td width="46" bgcolor="#83C2ED"> </td>
            </tr>
<?php 
for ($i = 0; $i < $num_rows; $i++) {
$clientid = mysql_result($result, $i, "clientid");
$client_name = mysql_result($result, $i, "client_name");
$date_joined = mysql_result($result, $i, "date_joined");
$client_rate = mysql_result($result, $i, "client_rate");
$client_remarks = mysql_result($result, $i, "client_remarks");

?>
            <tr>
              <td bgcolor="#FFFFCC" class="text8"> C 
                <? echo ($clientid <= 9) ? $clientid : $clientid;?>
			</td>
			</td><td bgcolor="#FFFFCC" class="text8"> 
                <? echo "$client_name";?>
			</td><td bgcolor="#FFFFCC" class="text8"> 
                 <? echo "$date_joined";?>
			</td><td bgcolor="#FFFFCC" class="text8"> 
                  <? echo "$client_rate";?>
			</td><td bgcolor="#FFFFCC" class="text8"> 
                  <? echo "$client_remarks";?>
			<? echo "</td><td align='center' bgcolor='#FFFFCC'><a href='clientmngr.php?id=3&clientid=$clientid' class='link1'>edit</a></td></tr>";?>
            <?        
} 
?>
            <tr>
              <td colspan="6" bgcolor="#83C2ED"><span class="text6"><img src="images/spacer.gif" width="10" height="2" /></span></td>
            </tr>
            <tr>
              <td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="60%"> </td>
                  <td width="39%" align="right"><!-- nav top -->
                      <?
				echo "<span class='link1'>".$nav_links."</span>";
				?>
                  </td>
                  <td width="1%" align="right"><img src="images/spacer.gif" width="12" height="10" /></td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td colspan="6"> </td>
            </tr>
        </table></td>
        <td align="right" bgcolor="#3261BB" width="1"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td colspan="3" valign="top" bgcolor="#3261BB"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
    </table></td>
    <td><img src="../images/spacer.gif" width="6" height="10"></td>
  </tr>
</table>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.