egemen Posted June 28, 2023 Share Posted June 28, 2023 <?php class pt { private function ar() { $data = array(); foreach ($_POST as $key => $value) { $data[$key] = $value; } return $data; } private function em($value) { $tf = false; // Set the default value to false if (!empty($value)) { $tf = true; } return $tf; } private function ff($value) { $n = htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); $m = htmlentities($n, ENT_QUOTES, 'UTF-8'); $s = addslashes($m); $y = strip_tags($s); $z = $y; return $z; } private function bh($key, $z) { $array = array(); // Create an empty array $array[$key] = $z; // Add the value $z to the 'key' key $ar = $array; return $ar; } public function bb($ar) { return $ar; } /* private function bod() { $result = $this->ar(); // Call the ar() method and assign the result to the $result variable $key = array_keys($result); // Get the keys of the $result array $value = array_values($result); // Get the values of the $result array $z = $value[0]; // Assign the first value of the $value array to the $z variable return array($key[0] => $z); // Return an array with the first key $key[0] and value $z } public function db() { $result = $this->ar(); // Call the ar() method and assign the result to the $result variable $this->bb(); // Call the bb() method $this->bod(); // Call the bod() method return $result; }*/ } Quote Link to comment https://forums.phpfreaks.com/topic/317020-what-do-i-need-to-do-to-make-the-code-mountain-safe-and-mountain-good/ Share on other sites More sharing options...
ginerjm Posted June 28, 2023 Share Posted June 28, 2023 (edited) Huh? What is 'mountain safe' or 'mountain good'? Never heard of those terms on a forum. As for the ar function: What's the point? You have a $_POST array already so why do you need to make a new array? And then you create the em function just to find out if a value is empty. Why does one need a function for that when PHP gives the empty function to use already? And your bh function. Not at all sure what you are trying to do but what you have is going to simply create a single element array (?) with a key and a value that you already know and that you could have put into an array on your own. This function doesn't do anything. And it also creates an extra array just so you can return it. Why? And the bb function. I won't even discuss that one. Nor the commented code. Edited June 28, 2023 by ginerjm 1 Quote Link to comment https://forums.phpfreaks.com/topic/317020-what-do-i-need-to-do-to-make-the-code-mountain-safe-and-mountain-good/#findComment-1610079 Share on other sites More sharing options...
egemen Posted June 28, 2023 Author Share Posted June 28, 2023 56 dakika önce ginerjm dedi ki: , In order to minimize post process vulnerabilities and the Hellenic-purpose project is safe, we get an average of 5 information from a form, for example closing post process vulnerabilities, for example xss vulnerabilities. Quote Link to comment https://forums.phpfreaks.com/topic/317020-what-do-i-need-to-do-to-make-the-code-mountain-safe-and-mountain-good/#findComment-1610085 Share on other sites More sharing options...
egemen Posted June 28, 2023 Author Share Posted June 28, 2023 post processing automation Quote Link to comment https://forums.phpfreaks.com/topic/317020-what-do-i-need-to-do-to-make-the-code-mountain-safe-and-mountain-good/#findComment-1610086 Share on other sites More sharing options...
requinix Posted June 28, 2023 Share Posted June 28, 2023 I don't know what you're asking or how to answer it either, but I can definitely confirm that the code you posted doesn't make any sense whatsoever and there is no reason it needs to exist. 1 Quote Link to comment https://forums.phpfreaks.com/topic/317020-what-do-i-need-to-do-to-make-the-code-mountain-safe-and-mountain-good/#findComment-1610089 Share on other sites More sharing options...
ginerjm Posted June 28, 2023 Share Posted June 28, 2023 I don't know what you wrote back to us but it makes no sense at all. I'm done. Quote Link to comment https://forums.phpfreaks.com/topic/317020-what-do-i-need-to-do-to-make-the-code-mountain-safe-and-mountain-good/#findComment-1610091 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.