<?php

	include "library.php";

	$cxn = start_code();
	
	$cxn_common = db_common_login();


	$task_id = val( $_POST, "task_id" );


    if ($task_id == "")
    {
        echo "<br>".black( "Task ID is blank" )."<br><br><br>";

        echo show_home_link();
    }
    else
    {
    	$query = "SELECT * FROM task WHERE id = ".$task_id;
        
    	$result = run_query( $query, $cxn );
    
        if (query_num_rows( $result ) == 0)
        {
            echo "<br>".black( "Task ID ".$task_id." not found" )."<br><br><br>";
    
            show_home_link();
        }
        else
        {
        	$data = get_row( $result );
        
            $request_id = $data['request_id'];
        
        
            jump_to_page( "display_items.php", "formname", "request", "id", $request_id );
        }    
    }
    
    
?>