$_GET[' '] with modal

$_GET[' '] with modal

hi,
i have a modal window in a link
  1. <p><a href="#window1" class="modal">Modal Link</a></p>

but i need it to integrate to my link which has a url to be use in GET method.

  1. <a href='Uploaded_Fileslist.php?compid=$compid&areaid=$areaid '>$area</a>
first, the link will direct it to Uploaded_Fileslist.php and get the value for compid and areaid
second, after querying the values, it will popup as a modal.

please show me how

TIA!