<?php

include('../../includes/con2pma3.php');

include('../../includes/checkSession.php');

$id = $_SESSION['id'];

$projectID = $_GET["projectID"];



?>

    <option value="">Select Contract No</option>

<?php



$result23 = mysql_query("SELECT Contract_id,Contract_no, Contract_title FROM projects, projectcontracts where

 projects.companySerial = '$id' AND projects.projStatus=1 AND projectcontracts.Contract_status=1

 AND projects.projectSerial=projectcontracts.project_id AND projectcontracts.project_id='$projectID' ORDER BY projects.projectCode ASC");



while($row = mysql_fetch_array($result23 , MYSQL_ASSOC))

{

    $i = $row['Contract_id'];

    $n = $row['Contract_no'];

    $t = $row['Contract_title'];

    $n .= ' - '.$t;


    /*    if( $i == $p)

            echo " <option selected='selected' value='$i'> $n </option>";

        else*/

    echo " <option value='$i'> $n </option>";

}

?>