nhojeinnor Posted January 28, 2011 Share Posted January 28, 2011 hi good day, im a little bit confuse. what i want to do is instead of $username = $_POST['username']; is to transform it into OOP? please help me. thanks. Link to comment https://forums.phpfreaks.com/topic/225933-how-to-declare-_post-in-oop/ Share on other sites More sharing options...
trq Posted January 28, 2011 Share Posted January 28, 2011 Why do you want to do this? You don't just transform procedural to OOP without any benifit. What is your expected benifit here? Link to comment https://forums.phpfreaks.com/topic/225933-how-to-declare-_post-in-oop/#findComment-1166423 Share on other sites More sharing options...
nhojeinnor Posted January 28, 2011 Author Share Posted January 28, 2011 because i have many input variables, like $fname $_POST['fname;];,$mname,$lname etc. what i want to do is to create a function that can call those variables w/o seeing it on my form.php? is that possible? thanks. Link to comment https://forums.phpfreaks.com/topic/225933-how-to-declare-_post-in-oop/#findComment-1166430 Share on other sites More sharing options...
ignace Posted January 28, 2011 Share Posted January 28, 2011 Create a Request class that handles all data coming in from the client. class Request { public function getQuery($offset, $default = null) {} public function getPost($offset, $default = null) {} } Link to comment https://forums.phpfreaks.com/topic/225933-how-to-declare-_post-in-oop/#findComment-1166431 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.