login system via on localhost not working

0 votes

I have a login system built and it works fine. Then I copied the code to my main computer to use it on localhost. Apache server and MySQL server was done through XAMPP. The problem is that chrome shows HTTP 405 error: HTTP Method not allowed. When I click submit after entering the credentials.

HTML (only the form part with no CSS):

<body>
    <div class="login">
        <h1>Login</h1>
        <form action="authenticate.php" method="post">
            <label for="username">
                <i class="fas fa-user"></i>
            </label>
            <input type="text" name="username" placeholder="Username" id="username" required>
            <label for="password">
                <i class="fas fa-lock"></i>
            </label>
            <input type="password" name="password" placeholder="Password" id="password" required>
            <input type="submit" value="Login">
        </form>
    </div>
</body>

Can someone please help me with this?

Jun 20, 2022 in PHP by Kithuzzz
• 38,000 points
1,564 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Actually the problem is not your code. Its actually your Webserver config. I advise you to validate you can reproduce the error with the MRE here before posting a query there with the appropriate code, error message, log entries, and webserver configuration details.

I hope this helps you.
answered Jun 28, 2022 by narikkadan
• 63,600 points

edited Mar 5
0 votes
​no answer to this question
answered Jun 22, 2023 by Richard jumbo

edited Mar 5

Related Questions In PHP

0 votes
0 answers
0 votes
0 answers

Pinterest login with PHP and cURL not working

I've been trying to use cURL to ...READ MORE

Aug 5, 2022 in PHP by Kithuzzz
• 38,000 points
2,043 views
0 votes
1 answer
0 votes
0 answers

Why is PHP session_destroy() not working?

Why is session_destroy() not working? Is there any other way ...READ MORE

Jun 12, 2022 in PHP by narikkadan
• 63,600 points
1,496 views
0 votes
0 answers

ErrorDocument 404 /404.php is not working in .htaccess file in PHP

This is the Content of my .htaccess file is: ErrorDocument ...READ MORE

Jun 21, 2022 in PHP by narikkadan
• 63,600 points
927 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
10,965 views
0 votes
1 answer

Vertically centering text in a div

Try this code: .smallUnitBox { ...READ MORE

answered Sep 3, 2018 in Blockchain by digger
• 26,740 points
994 views
0 votes
1 answer
0 votes
0 answers

Anyone can help me out to understand the semantic of (document.getElementBYId("demo").innerHTML="Hello") ?

Hello guys, Can Someone helps me to find ...READ MORE

Jan 17, 2020 in Web Development by anonymous
• 37,520 points
1,035 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP