jamesharry404 Posted September 13, 2013 Share Posted September 13, 2013 (edited) Hello Friends, There is a Question for you guys, Please tell me this code is correct or not. I want id on another page for delete the same id details. Is it wrong so please give me the correct one. I am waiting for you code. Thank you in advance. <a href="target.php?id=<?php echo $pageid ?>">For Get it in php</a> _____________________________________________________ Event Management Companies in Delhi | SEO Company in Delhi Edited September 13, 2013 by jamesharry404 Quote Link to comment Share on other sites More sharing options...
PravinS Posted September 13, 2013 Share Posted September 13, 2013 its correct Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted September 13, 2013 Share Posted September 13, 2013 its correct NO IT'S NOT! Don't use the GET method to add/delete or modify. Use a form method POST and a delete button. If you want to do it the way you have it, then target.php should have a form using the POST method and the passed in $_GET['pageid'] and a delete or confirm button. Quote Link to comment Share on other sites More sharing options...
DFulg Posted September 13, 2013 Share Posted September 13, 2013 I think we would need to see all of the relevant code along with a clearer description of what exactly you are trying to do in order to adequately answer your question. Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted September 13, 2013 Share Posted September 13, 2013 Well-designed apps/sites are RESTful, which is a fancy way of saying that GET should only be used to retrieve information and POST should only be used to modify information. Those methods are HTTP verbs. They have meaning, and should be used according to those meanings. If you have a list of items that a user should be able to delete one-by-one, just make each entry its own form that uses POST. There's no rule saying you can only have one form on a page. Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted September 13, 2013 Share Posted September 13, 2013 Well-designed apps/sites are RESTful, which is a fancy way of saying that GET should only be used to retrieve information and POST should only be used to modify information. Those methods are HTTP verbs. They have meaning, and should be used according to those meanings. If you have a list of items that a user should be able to delete one-by-one, just make each entry its own form that uses POST. There's no rule saying you can only have one form on a page. Yes, multiple forms or one form with multiple buttons with unique values of page_id. 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.