izapharry Posted August 26, 2009 Share Posted August 26, 2009 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 ? Quote Link to comment Share on other sites More sharing options...
waynew Posted August 26, 2009 Share Posted August 26, 2009 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 ? It's a $_GET variable. Disadvantages? It's shown in the URL, which means that it's not exactly acceptable for passwords etc. It also can't handle as much text as $_POST can. Advantages? It makes dynamic pages pretty easy to whip up in comparison to $_POST variables. Allows for users to visit the page without having to POST to it. Allows bookmarking etc. Quote Link to comment Share on other sites More sharing options...
lrvv Posted August 31, 2009 Share Posted August 31, 2009 you can get val from $_post!you can use post when you want to post big val! Quote Link to comment Share on other sites More sharing options...
gevensen Posted September 8, 2009 Share Posted September 8, 2009 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 ? disadvantages are hackers trying to input code you would need something like this to avoid that the call: whatevevername.php?id=1 the receiving code if(isset($_GET['id')) { $id=htmlspecialchars($_GET['id']; } that messes up a hack attempt instead of just trying to bring the data into a variable that could be executed for example if you echoed echo "$id"; if there was a hack in there you would be executing the code i do that with post too Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.