Browser MMO Video #5

Location of the Videos
Post Reply
herko125
Posts: 17
Joined: Fri Oct 16, 2009 3:12 pm

Re: Video#5

Post by herko125 »

yea i know ^^
deluxxmanx
Posts: 88
Joined: Thu Nov 26, 2009 10:22 pm

Re: Video#5

Post by deluxxmanx »

Hiya :)
Got this problem when trying to log in:
Parse error: parse error in D:\wamp\www\tutorial\authenticate.php on line 7
Here's my code :(

Authenticate.php

Code: Select all

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

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

  $query = "select name,password from players where name='$player' and '$password'";
  $result = mysql_query($query) or die("Could not query players");
  $result2 = mysql_fetch_array($result);
  if ($result2)
  (
    $_SESSION['player']=$player;
    
    echo "<big>Logged in successfully<br>";
    echo "<A href='battle.php'>Continue</a></big>";
  )
  else
  (
   echo "<big>Wrong Username or Password.<A href='login.php'>Try Again</a></big>";
  )
)
?>
Image
I am a PS CS4 artist. Signature above made by me.
User avatar
Lord Strife
Posts: 104
Joined: Wed Oct 28, 2009 3:10 pm

Re: Video#5

Post by Lord Strife »

change your ( ) to { } in the if and else statements
deluxxmanx
Posts: 88
Joined: Thu Nov 26, 2009 10:22 pm

Re: Video#5

Post by deluxxmanx »

Could you please post me the whole, edited code? Thank you :)
Image
I am a PS CS4 artist. Signature above made by me.
Falken
Posts: 438
Joined: Fri May 08, 2009 8:03 pm

Re: Video#5

Post by Falken »

deluxxmanx wrote:Could you please post me the whole, edited code? Thank you :)
Oh come on, not a hard error. A simple PHP syntax error...
This is wrong:

Code: Select all

if (true)
(
echo "true";
)
This is right:

Code: Select all

if (true)
{
echo "true";
}
The differences are just () should be {} in the places showed above. If you gonna make a mmo you can't expect people will be fixing this kind of problem all the time so you just can copy & paste, you will learn a lot more by fixing it yourself after someone showed you!
--- Game Database ---
For all your game information needs!
Visit us at: http://www.gamedatabase.eu today!
deluxxmanx
Posts: 88
Joined: Thu Nov 26, 2009 10:22 pm

Re: Video#5

Post by deluxxmanx »

Thank you :)
Image
I am a PS CS4 artist. Signature above made by me.
kingdk
Posts: 1
Joined: Sun Nov 29, 2009 4:32 pm

Re: Video#5

Post by kingdk »

Can someone please post the codes for this video. I tried to write them myself but was very confused. Or just email them to me kingdkknox@yahoo.com

thanks!
princezane
Posts: 11
Joined: Sun Nov 29, 2009 3:35 am

Re: Video#5

Post by princezane »

I don't have the code for this anymore as these files get updated in the next video, where are you having a problem maybe we can help you out. Post any errors you're getting along with the code and we'll see what we can do :)
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video#5

Post by hallsofvallhalla »

yes post the errors but i recommend everyone continue with the videos till you get to some source. There is no point in trying to type all this out now. Just watch the videos and learn.
phq
Posts: 14
Joined: Fri Dec 11, 2009 7:24 am

Re: Video#5

Post by phq »

Hi,
how come when I try to login my password doesn't work I have to enter
c112ca8d2922bcaac5c64b666dc0fae0 instead of my normal pass.
Post Reply

Return to “Older Browser MMO Videos”