Maybe some help for some peoples!:

Location of the Videos
Post Reply
Huezzer
Posts: 72
Joined: Mon Jan 31, 2011 7:47 pm

Maybe some help for some peoples!:

Post by Huezzer »

Hey I've just figured out a actually working Authenticate code: It works wonderful for me :P

Here it's: Authenticate.php

Code: Select all

<?php
include_once 'connect.php';
session_start();
ob_start();

if (isset($_POST['submit']))
{
  $player=$_POST['player'];
  $password=$_POST['password'];
  $player=strip_tags($player);
  $password=strip_tags($password);
  $password=md5($password);

  $query = "select name,password from players where name='$player' and password='$password'";
  $result = mysql_query($query) or die("Could not query players");
  $result2 = mysql_fetch_array($result);
  if ($result2)
  { 
    $_SESSION['player']=$player;
    
    echo "<br><br><br><br><br><center><big>Logged in successfully<br>";
    echo "<A href='index.php'>Continue</a></big></center>";
  
  header('refresh: 2; index.php');
  ob_end_flush();
  }
  else
  {
   echo "<big>Wrong username or password.<A href='login.php'>Try Again</a></big>";
  }
}
?>
You can always change some things like " header('refresh: 2; index.php'); " 2 seconds if you don't want it, and also remove it totaly if you don't need it :P

This was just some help for you all, Good luck with your games,

Huezzer. :)
User avatar
62896dude
Posts: 516
Joined: Thu Jan 20, 2011 2:39 am

Re: Maybe some help for some peoples!:

Post by 62896dude »

Good work, glad you figured it out!
Languages: C++, C#, Javascript + Angular, PHP
Programs: Webstorm 2017, Notepad++, Photoshop
Current Project: HP Destiny
Post Reply

Return to “Older Browser MMO Videos”