Undefined index with $_POST [duplicate]
In PHP, a variable or array element which has never been set is different from one whose value is null; attempting to access such an unset value is a runtime error. That’s what you’re running into: the array $_POST does not have any element at the key “username”, so the interpreter aborts your program before … Read more