I have slideshow where i am displaying the current news..when user click on the slideshow image it redirects to a post.php with the convention below.

/post.php?id=16&title=i-am-the-first-post


i want to show this page for better SEO as


/posts/16/i-am-the-first-post/

any one help me?