Here is certain expert's code:
In this example, at first line 34 and 35 doesn't exist. So, it have one bug as described here:
Set id and password as:
i)' OR '1'='1
ii)' OR ''='
iii) hi' OR 'x'='x
Which also mentioned here:
I am a noob in SQL and php. Really don't know why is this. I'd appreciate if you can tell me.
Update:
In this case, I should have input username and password to log in. But this bug enable one to input something else to log in and see some private content which only accessible to certain group. And the 34 and 35 line fix this bug. I don't know really understand this bug, why some other input enable you to log in?