www.webdeveloper.com
Results 1 to 4 of 4

Thread: 2 forms on one html page

  1. #1
    Join Date
    Apr 2012
    Posts
    1

    2 forms on one html page

    I have a problem with putting two forms on one html page this is my coding:


    [SIZE="2<form action=/guru_website/register_landing.php method="post" id="1" name="register" >

    <div class="surounding">
    <input type="text" value="Enter username" size="10" name="rusername"/>
    </div>

    <div class="surounding">
    <input type="text" value="Enter password" size="10" name="rpassword"/>
    </div>

    <div class="surounding">
    <input type="text" value="Retype password" size="10" name="rerpassword"/>
    </div>
    <br/>
    <div class="register_surounding">

    <input type="submit" value="Register" />
    </div>

    </form>


    </div>


    <div class="divdroite"

    <form action=/guru_website/login_landing.php; method="post" id="2" name="login" >

    <div class="surounding">
    <input type="text" value="username" size="10" name="username"/>
    </div>

    <div class="surounding">
    <input type="text" value="password" size="10" name="password"/>
    </div>
    <br />
    <div class="register_surounding">

    <input type="submit" value="Login" />
    </div>

    </form>[/SIZE]

    this is what it looks like
    HTML Code:
    form action=/guru_website/register_landing.php method="post" id="1" name="register" >
    
    <div class="surounding">
       <input type="text"  value="Enter username" size="10"  name="rusername"/>
    </div>
    
    <div class="surounding">
      <input type="text" value="Enter password"  size="10" name="rpassword"/>
    </div>
    
    <div class="surounding">
      <input type="text" value="Retype password"  size="10" name="rerpassword"/>
    </div>
    <br/>
    <div class="register_surounding">
    
      <input type="submit" value="Register" />
    </div>
    
    </form>
    
    
    </div>
    
    
    <div class="divdroite"
    
    <form action=/guru_website/login_landing.php; method="post" id="2" name="login" >
    
    <div class="surounding">
       <input type="text"  value="username" size="10"  name="username"/>
    </div>
    
    <div class="surounding">
      <input type="text" value="password" size="10" name="password"/>
    </div>
    <br />
    <div class="register_surounding">
     
      <input type="submit" value="Login" /> 
    </div>
    
    </form>
    form action=/guru_website/register_landing.php method="post" id="1" name="register" >
    
    <div class="surounding">
       <input type="text"  value="Enter username" size="10"  name="rusername"/>
    </div>
    
    <div class="surounding">
      <input type="text" value="Enter password"  size="10" name="rpassword"/>
    </div>
    
    <div class="surounding">
      <input type="text" value="Retype password"  size="10" name="rerpassword"/>
    </div>
    <br/>
    <div class="register_surounding">
    
      <input type="submit" value="Register" />
    </div>
    
    </form>
    
    
    </div>
    
    
    <div class="divdroite"
    
    <form action=/guru_website/login_landing.php; method="post" id="2" name="login" >
    
    <div class="surounding">
       <input type="text"  value="username" size="10"  name="username"/>
    </div>
    
    <div class="surounding">
      <input type="text" value="password" size="10" name="password"/>
    </div>
    <br />
    <div class="register_surounding">
     
      <input type="submit" value="Login" /> 
    </div>
    
    </form>
    but when i click on submit on the second form it doesn't do anything it doesn't process it
    I need help please
    thanks in advance

  2. #2
    Join Date
    Apr 2012
    Posts
    15
    Ha, the answer is I don't know, however I am going to give you some ideas.

    1.- Try each form separately and check if both of them work correctly.
    2.- Check in different browsers (It could be related to your browser).
    3.- Get ride of all the divs and check if it works without them and then start adding them one by one and check if they are working.
    4.- An alternative would be to use a frame for each of them.

    Good luck!

  3. #3
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194
    dirty coding...

  4. #4
    Join Date
    Apr 2012
    Posts
    38
    Code:
    <form action=/guru_website/login_landing.php; method="post" id="2" name="login" >
    check if it works when you remove the ; after login_landing.php

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles