Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <?php //echo $_REQUEST["uname"]; ?>
- <?php //echo $_REQUEST["pwd"]; ?>
- <?php
- $con = mysql_connect("localhost","root","");
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- }
- mysql_select_db("sandeep", $con);
- $result=mysql_query("select * from userlogin where username=$_post['uname']&&password=$_post['pwd']");
- mysql_close($con);
- $result2=mysql_query("select * from userlogin");
- if(mysql_num_rows($result)>0)
- {
- echo "<table><tr>"
- for($i=0;$i<mysql_num_rows($result2);$i++)
- {
- echo "<th>".mysql_field_name($result,$i)."</th>";
- echo " ";
- }
- echo "</tr>";
- while($row=mysql_fetch_array($result2))
- {
- echo "<tr>";
- echo "<td>".$row['username']."</td>";
- echo "<td>".$row['password']."</td>";
- echo "</tr>";
- }
- }
- ?>
- <body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement