I am not redirecting to the respective page.What might be the reason?????Can i get my code correctly.Any help would be appreciated

  <form action="rollno.php" method="GET">
            <td><input type="text" id="username" name="username" value="<?php if (isset($_GET['username'])) { echo $_GET['username']; } ?>"><span style="color:red">

            if(isset($_GET['username'])&&($_GET['username']=="") )
              echo "please enter username" ;?></span></td>
            <td><input type="text" id="password" name="password" value="<?php if (isset($_GET['password'])) { echo $_GET['password']; } ?>"  ><span style="color:red">
            <?php if(isset($_GET['password'])&&($_GET['password']=="") )
                echo "please enter password";?></span></td>
                <input type="submit" value="submit" ></td>

Recommended Answers

All 2 Replies

whats the source of the page when you view it in a browser?

Didnt see anything wrong in that code


<?php if(isset($_GET['password'])&&($_GET['password']=="") )
<?php if(!isset($_GET['password']) || (isset($_GET['password']) && $_GET['password']==""))

will work if $_GET isn't set as well

What is the code on your rollno.php page?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.