<?php ... $id = $user_profile['id']; $_SESSION['id'] = $id; header('Location: checkIfExsists.php?id='.$id); ?>