Expand|Select|Wrap|Line Numbers
- <form action="action/index.php" method="post"><table width="40%" border="0" cellspacing="0" cellpadding="0" align="center">
- <tr>
- <td height="20" width="9"><img src="http://example.com/submit/images/001.jpg" width="9" height="20"></td>
- <td align="center" bgcolor="#B1D476" class="heading">Admin Login</td>
- <td height="20" width="9" align="right"><img src="http://example.com/submit/images/002.jpg" width="9" height="20"></td>
- </tr>
- <tr>
- <td background="../images/5.png" valign="baseline" style="background-repeat:repeat-y;background-position:left;" width="7"> </td>
- <td><table width="100%" border="0" cellspacing="2" cellpadding="2">
- <tr>
- <td class="links">Username</td>
- <td><input name="textfield" type="text" class="short_text" /></td>
- </tr>
- <tr>
- <td class="links">Password</td>
- <td><input name="textfield2" type="password" class="short_text" /></td>
- </tr>
- <tr>
- <td colspan="2" align="center"> <input type="submit" name="Submit" value=" Login " /></td>
- </tr>
- </table></td>
- <td background="../images/5.png" align="right" style="background-repeat:repeat-y;background-position:right;" width="7"> </td>
- </tr>
- <tr>
- <td height="7" width="7"><img src="http://example.com/submit/images/4.gif" width="9" height="7"></td>
- <td valign="bottom" style="background-repeat:repeat-x;background-position:bottom;" background="../images/5.png"></td>
- <td height="7" width="7"><img src="http://example.com/submit/images/3.gif" width="9" height="7"></td>
- </tr>
- </table></form>
when i click submit button it want check this code and need to return menu.php , but it goes to same admin.php
below file name is action/index.php
Expand|Select|Wrap|Line Numbers
- <? session_start();
- include "../../conn.php";
- if(isset($_REQUEST['Submit']))
- {
- $sql=mysql_query("select * from user where username='".$_REQUEST['textfield']."' and password='".md5($_REQUEST['textfield2'])."'");
- header("location:../menu.php");
- }
- ?>