im sure you asked this question to find a way to avoiding show ID to public.
you can use session in this case like this:
<?php
session_start();
$_SESSION['session_name']=$id; // Set the value of the id you want to pass.
?>
and in profile.php page you need this:
<?php
session_start();
$id = $_SESSION['session_name'];
?>
or you can use JQuery.post to pass your data.