Redirect after form database imsert

What if for displaying my page I need some parameters. For example, on the page I have query “select * from mytable where id=”.$id; and this id goes from insertion code.
Then if I redirect from the page with insertion code to displaying page I will loose id and will not be able to display page without error. How to pass id with redirect?
Save it in cookie?