I still a beginner. When I get stuck and ask at stackoverflow.com they just tell me too many advanced stuffs and I don;t understand their language level and so I need you people to chime in.
They tell me to write error codes based on these links but I'm still beginner and don't understand all these error handlers and catchall and throw or whatever the heck they are.
Can you folks be kind enough to checkout these 2 links:
And once you've learnt the advanced way to safely write error reporting and mysqli connection failure error codes from those 2 links then share your finds (code) with us.
They keep telling me to log errors to a file outside the public_html. I don't know how to do all this stuff. That is why I asking you. To show me a code sample.
I believe the 2 links will be handy for you too. You might learn a thing or 2 about website security. And so, do bother to check the 2 links out. Then ofcourse get back to me with your noted codes. 😉
Once you have given me your codes that are bug free, then I go and learn it. First try to understand the lines. Then memorise them.
Even though I am reading the 2 links now, I don't quite understand what they are teaching as it is adv stuff.
At stackoverflow.com, I'm scared to ask questions on other topics other than error reporting or mysqli connection failure error coding. Because, they always ask me where my error reporting and mysqli conenction codes are and when I show them then they say they told me before to fix them in past threads and I still haven't. They show irritation.
Problem is, the links they give me is too much over my head and I don;t understand them. Hence, I fail to adapt their adv level way.
So, I think best you adv guys check the links out and note the proper codes the proper way and then share them here with us. That way, beginners like me don't have to wade through the whole sea just to catch 2 fishes.
No. Not trying to get you to do my dog work but you might learn a thing or 2 from the links yourselves. let me know if you learnt anything new or not. Ok ?
Else, I just stick to my beginner level error reporting and mysqli connection error codes which stackoverflow.com programmers have a problem with .....
$server = 'localhost';
$db_user = 'root';
$db_password = '';
$db = 'test';
$conn = mysqli_connect($server,$db_user,$db_password,$db);
echo "Mysqli Connection Error" . mysqli_connect_error();
echo "Mysqli Connection Error Number" . mysqli_connect_errno();
When I get codes from tutorials or php manual, stackoverflow.com programmers tell me they are outdated. So, where the hell am I supposed to learn the non-outdated way I asked today and they gave me those links. Just have a look at the links, it's gonna drive you crazy, if you were a beginner!
Pissing me off.
To make things worst, the links are oop. I still at procedural. Don't know pdo either. I tell stackoverflow.com guys this but they expect me to ditch mysqli and procedural and jump to pdo. I told them today, I ain't quitting half-way as I don't want to gain a habit of quitting things half-way. So stubbornly, I am sticking to mysqli until I finished my current project to build a pagination with it.
They hint, the links will teach hack proof. Sort of. This is where our php won't echo errors to users, who could be a hacker, and give out security info. They say, I shouldn't manually check for mysqli, prepared statement, connection errors or whatever.