5
votes
Accepted
Parsing gateway ip from `/proc/net/route` in a docker container
Reading the gateway IP
I'm not an expert of reading routing info, but:
Linuxtopia's article on Linux Filesystem Hierarchy confirms that /proc/net/route contains ...
4
votes
Accepted
Follow up to Validation Script in PHP
First query looks good.
any more improvements
I don't understand why you're even asking the question.
What part of Sam's "use bound variables" answer was unclear?
We start out with ...
4
votes
Accepted
PHP Validation script
Use bound parameters in database queries
In the answer to your previous question by Your Common Sense was this advice:
in SQL, always use parameters instead of PHP variables for any database ...
3
votes
Boolean Value Object
What I understand about your class, it would take $bool as an input then parse it to boolean value. So it has 2 responsibilities here: parse string to boolean and represent a boolean value.
Also, if ...
3
votes
Parsing gateway ip from `/proc/net/route` in a docker container
It is wise to ensure an array has a key before dereferencing it
After the call to preg_match() the code accesses key 2:
...
2
votes
Accepted
SQL & PHP login method
Yes indeed, your approach is severely outdated. Such a code nowadays is frowned upon. Here are some rules for the better code
Each script should consist of four parts
Initialization. Usually it's ...
2
votes
How to reduce a POST request duplicate in Laravel/PHP for payment system?
There are two ways to reduce duplicate POST request code in Laravel/PHP for a payment system:
Use a trait. This allows you to define a reusable block of code that can be shared across multiple ...
2
votes
Selecting random results within Doctrine
Increment operator ➕➕ can be moved up after usage in while loop
In the first while loop to add numbers to ...
1
vote
Accepted
PHP login codes suggestions
Nice to hear you got your code working. I will help you a bit with the validation script. These are the points of improvement:
Your input filtering is not doing anything because you haven't specified ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
php × 4296object-oriented × 660
mysql × 586
security × 388
pdo × 330
performance × 297
laravel × 254
mysqli × 249
html × 243
beginner × 237
array × 224
mvc × 207
sql × 198
php5 × 186
javascript × 179
authentication × 158
validation × 127
design-patterns × 120
wordpress × 113
jquery × 111
ajax × 111
form × 110
classes × 95
session × 94
codeigniter × 91