0

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">
    <table>
        <tr>
            <td>username</td>
            <td><input type="text" id="username" name="username" value="<?php if (isset($_GET['username'])) { echo $_GET['username']; } ?>"><span style="color:red">
            <?php

            if(isset($_GET['username'])&&($_GET['username']=="") )
              echo "please enter username" ;?></span></td>
        </tr>
        <tr>
            <td>password</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>
        </tr>
        <tr>
            <td></td>
            <td>
                <input type="submit" value="submit" ></td>
        </tr>
    </table>
    </form>

Edited by Dani: Formatting fixed

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by simplypixie
0

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

Didnt see anything wrong in that code

also

<?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

Edited by Biiim: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.