leeharvey09 Posted February 15, 2010 Share Posted February 15, 2010 does keeping your code wrapped in private functions make your code more secure when live online eg. <?php private function formInputs(){ $name = $_POST['sendNamehiddenField']; $email = strtolower($_POST['sendEmailhiddenField']); $message = $_POST['sendMessagehiddenField']; $screensize = $_POST['screenSizeHiddenField']; } ?> rather than just keeping the code like this [code=php:0] <?php $name = $_POST['sendNamehiddenField']; $email = strtolower($_POST['sendEmailhiddenField']); $message = $_POST['sendMessagehiddenField']; $screensize = $_POST['screenSizeHiddenField']; ?> are there any real dangers even when i don't want to return a value any help would be great cheers Lee Harvey [/code] Link to comment https://forums.phpfreaks.com/topic/192123-private-functions/ Share on other sites More sharing options...
ToonMariner Posted February 15, 2010 Share Posted February 15, 2010 No. The visibility of your methods between classes is nothing to do with security. Link to comment https://forums.phpfreaks.com/topic/192123-private-functions/#findComment-1012514 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.