Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- session_destroy();
- $ajhgsfdgg = $_POST['uni'];
- $piokmihuyg = $_POST['pwi'];
- mysql_connect("127.0.0.1", "root", "*ADMINPASS*") or die(mysql_error());
- mysql_select_db("*DB*") or die(mysql_error());
- $asdgasugsoioajwd = mysql_query("SELECT * FROM *USERTABLE*") or die(mysql_error());
- if(!isset($_SESSION['user'])){
- if(!isset($ajhgsfdgg)){
- echo "Welcome to *Your website name here*.<br>";
- echo "Please login:<br>";
- echo "<form method=POST>";
- echo "Username: <input type=text name=uni><br>";
- echo "Password: <input type=pass name=pwi><br>";
- echo "<input type=submit value=Login>";
- echo "</form>";
- exit;
- }
- while($row = mysql_fetch_array($asdgasugsoioajwd)){
- $piokmihuyg = md5($piokmihuyg);
- if($piokmihuyg == $row['password'] && $ajhgsfdgg == $row['username']){
- $_SESSION['user'] = $ajhgsfdgg;
- echo "<Meta http-equiv=Refresh content='0'>";
- }
- }
- echo "<Meta http-equiv=Refresh content='0'>";
- exit;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement