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 ? Link to comment https://forums.phpfreaks.com/topic/171974-_get/ 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. Link to comment https://forums.phpfreaks.com/topic/171974-_get/#findComment-906791 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! Link to comment https://forums.phpfreaks.com/topic/171974-_get/#findComment-909592 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 Link to comment https://forums.phpfreaks.com/topic/171974-_get/#findComment-915094 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.