// Get data records from table.
$result=mysql_query(
"select projects.project_id,companies.company_name,projects.project_name,projects.project_target_budget,projects.project_start_date,projects.project_end_date, projects.project_actual_end_date,users.user_username
from projects , users ,companies
where projects.project_owner = users.user_id and projects.project_company = companies.company_id and projects.project_status ='2' and projects.project_actual_end_date between '$newdate1' and '$newdate2' order by projects.project_id");