https://drjkpalli.lovestoblog.com/login
POST 302 found error:
Hello guys. I am trying to access the user email and password hash to check if they match with what the user posted in the login page while trying to login to the website. Even with the correct credentials, nothing happens when i click the login button, just an undefined error message appears on the webpage.
so, before i click on the login button, this is what my console looks like while i am in the login page:
after i press the login button (after entering the correct credentials), this is what the console looks like:
Now, if i use seperate files for my script and my html pages, everything works fine. but if i use my php script and the html code in the same file with the .php extension, the above problem begins. somehow mysteriously, the url contains an includes folder and a login.php file, none of which i have in my htdocs folder or the login folder. the login folder inside my htdocs folder has the index.php file which is the file that contains both my script and the html code.
here is a part of the index.php file:
at the top is my php script:
somewhere inside my html tag is my form:
Inside my .htaccess file, i had to add the first block of lines 1-10 because the index.php file inside my login folder wouldn’t display in firefox. without it, just a white screen appears in the browser window.
Here is my .htaccess file contents:
- why does this work when the script and the html are in two different files but doesn’t work when both of them are in a single file ??
- where is the includes folder coming from, where is the login.php file coming from ?
My website is live. please sign up with some test credentials and try to login after that to replicate the above problem.
here is the detailed 302 error: