1

At Click "Login", Nothing, Don't Procces The Form, Can Help me?

Code:

        <form method="POST" action="" id="login">
        <div class="input-group">
          <span class="input-group-addon" id="basic-addon1">
            <i class="fa fa-user" aria-hidden="true"></i></span>
          <input type="text" class="form-control" placeholder="Username" name="Username" aria-describedby="basic-addon1" required>
        </div>
        <div class="input-group"> 
          <span class="input-group-addon" id="basic-addon2">
            <i class="fa fa-key" aria-hidden="true"></i></span>
          <input type="password" class="form-control" placeholder="Password" name="Password" aria-describedby="basic-addon2" required>
        </div>
        <div class="text-center">
            <input type="submit" form="login" class="btn btn-success btn-submit" value="Login">
        </div>
    </form>

what is Wrong? Can Help Me? uPDATE Code: https://hastebin.com/wemerigodu.scala

4
  • What you what on "Login" button click? Commented Apr 13, 2017 at 6:41
  • When I click, I should load the page, but when I click, the button does not work, I need to know when I'm wrong Commented Apr 13, 2017 at 6:42
  • For That you have to specify action in form. Commented Apr 13, 2017 at 7:03
  • you have to enter the target url in action="" tag Commented Apr 13, 2017 at 7:11

3 Answers 3

3

When you are making the form, you have typed: <form method="POST" action="" id="login>" To make the form working type the file name that contains the code to login for example:

<form method="POST" action="login_verify.php" id="login">
    <div class="input-group">
      <span class="input-group-addon" id="basic-addon1">
        <i class="fa fa-user" aria-hidden="true"></i></span>
      <input type="text" class="form-control" placeholder="Username" name="Username" aria-describedby="basic-addon1" required>
    </div>
    <div class="input-group"> 
      <span class="input-group-addon" id="basic-addon2">
        <i class="fa fa-key" aria-hidden="true"></i></span>
      <input type="password" class="form-control" placeholder="Password" name="Password" aria-describedby="basic-addon2" required>
    </div>
    <div class="text-center">
        <input type="submit" form="login" class="btn btn-success btn-submit" value="Login">
    </div>
</form>
Sign up to request clarification or add additional context in comments.

10 Comments

oh, don't work :( is problem of my assets or anything?
What is the file name that contains the code for the login (PHP)
the same page, (login.php), the all code of login.php (form): hastebin.com/julasuxeka.xml
Try <form method="POST" action="login.php" id="login">
i tested with a normal form, and don't work, is my assets sure
|
1

A button located outside a form (but still a part of the form).

And you have a page in action attribute that receives the submitted field's value.

<form action="Your_Handle_Page" method="get" id="form1">
  First name: <input type="text" name="fname"><br>
  Last name: <input type="text" name="lname"><br>
</form>

<button type="submit" form="form1" value="Submit">Submit</button>

1 Comment

I Used This, And Don't Work
1

you haven't specify action on form submit you need to write redirect url in form action element as below.

<form method="POST" action="xyz.html" id="login">
    <div class="input-group">
      <span class="input-group-addon" id="basic-addon1">
        <i class="fa fa-user" aria-hidden="true"></i></span>
      <input type="text" class="form-control" placeholder="Username" name="Username" aria-describedby="basic-addon1" required>
    </div>
    <div class="input-group"> 
      <span class="input-group-addon" id="basic-addon2">
        <i class="fa fa-key" aria-hidden="true"></i></span>
      <input type="password" class="form-control" placeholder="Password" name="Password" aria-describedby="basic-addon2" required>
    </div>
    <div class="text-center">
        <input type="submit" form="login" class="btn btn-success btn-submit" value="Login">
    </div>
</form>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.