<?php

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

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

$id = $_SESSION['id'];

$projectID = $_GET["q"];



?>

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

<?php



$result21 = mysql_query("SELECT  Contract_no, Contract_id, 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($result21 , MYSQL_ASSOC))

{

    $i = $row['Contract_id'];

    $n = $row['Contract_title'];



/*    if( $i == $p)

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

    else*/

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

}

?>

