what is the working of this line 'http://localhost/movies/moviesite.php?fm=$fm why we have to post the variable like this what is the benefits and disadvantage of of this style of coding ?
Well the main reason we use such a thing is that we can easily give users a chance to remember or bookmark the url
That and you can easily go back and forth in a browser without it constantly asking you if you want to re-send data. It's also the main way to pass data from an html link (ie: you can't POST from a link in an email for example).
A $_GET variable is a quick and easy way to pass variables from one page to the next. For example, say you had a form on index.php where a user can choose a movie format. The form takes the user input and sends the results to moviesite.php If they choose 'avi', then the form (assuming it has action=moviesite.php, method=get, and an input name=fm, value=avi) when submitted the form will send the user to moviesite.php?fm=avi. Then, on moviesite.php, you can add: $movie_format = $_GET['fm']; Then the user's input is stored in $movie_format, and you can use that for whatever your need is.
When you want to pass variables with query string then its useful it will find on which link you have clicked