Jump to content

Private Functions


leeharvey09

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.