Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.
Hi all. Please help me with this one - I'm a noob so it's probably really simple!
I have the following script that shows a login form, takes only the username at the moment, and compares it against a flat-file DB. It doesn't work. No matter whether I enter the correct username or not, it resets the form. If the username is wrong, it doesn't even show the message!
Also, read through these: http://bg.php.net/manual/en/ref.array.php
... there's bound to be a function that can check if an item can be found inside an array, you shouldn't reinvent the wheel like that.
Also, since this is the security forum, it's worth mentioning that the files with the usernames and passwords may be accessible to the wide world
hi;
I am also having a simmilar problem but i think that i can figure out few errors with my knowledge. I am also new to this subject.
looks like first of all you havent set up the button action properley. Also you havent define the array and itme variables. if you can see my code in the forum you may be able to get some idea. But i am having the same problem as well. I am using MYSQL and encryption. there are plenty of youtube viedoes about this and its always better to have a look at it.
Regards
Shehan31
phillid wrote:Hi all. Please help me with this one - I'm a noob so it's probably really simple!
I have the following script that shows a login form, takes only the username at the moment, and compares it against a flat-file DB. It doesn't work. No matter whether I enter the correct username or not, it resets the form. If the username is wrong, it doesn't even show the message!