Browser MMO Video #5

Location of the Videos
Post Reply
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Browser MMO Video #5

Post by hallsofvallhalla »

arkh
Posts: 14
Joined: Sun Jun 14, 2009 6:15 am

Re: Video#5

Post by arkh »

wow cool thanks for this now i made my login ^^.

one question since you already showed how to make the browser to check who is logged in. with session.
then how do you make it somethings from the database to be shown.

like equipment,stats,titles,hp,mp and other stuff
smashy
Posts: 6
Joined: Sun Jun 14, 2009 5:28 pm

Re: Video#5

Post by smashy »

fery helpfull tutorial....
i used the Login System v.2.0 that is PHP Login Script with Remember Me Feature you can get it here is free
http://evolt.org/files/Login_System_v.2.0.zip
maybe i will try to make it myself using your tutorials but in this script comes the admin center
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video#5

Post by hallsofvallhalla »

thanks for the link


also I forgot to post the source, my bad, will do later.

I am not sure what you mean about somethings from the database. Like what? If its the players info then you have already queried it with $playerinfo3.

so say you have 3 stats
experience
stamina
level

to use them as a variable
$playerinfo3[experience]
$playerinfo3[stamina]
$playerinfo3[level]
arkh
Posts: 14
Joined: Sun Jun 14, 2009 6:15 am

Re: Video#5

Post by arkh »

so it's like this.

if i put something in the database with the title of Avatar and and entry was inserted there like an url.
like http://www.website.com/image.jpg then if i placed $playerinfo3['Avatar'] then does that mean it would show the image?

Code: Select all

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

if (isset($_SESSION['player']))
{
  $player=$_SESSION['player'];
}
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);

$avatar = $playerinfo3['Avatar']
$Equipment = $playerinfo3['Equipment']
is this something like this??

i get what you said about the stats and other info. oh and what kind of script is used to modify data in database?
Socapex
Posts: 16
Joined: Sun Jun 14, 2009 10:00 pm

Re: Video#5

Post by Socapex »

I'm not sure about this, but from what I've understood so far, you would do:

echo $playerinfo3['avatar'] . "<br>";

is that correct?

You could define it as variable I guess...

$avatar = $playerinfo3['avatar'];
echo $playerinfo3['name'] . "<br>" . $avatar . "<br>";

This would place the name on top of the avatar.... I think :) You could always put it inside a html table and then center it. PHP rocks solid!
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video#5

Post by hallsofvallhalla »

you are on the right track!
User avatar
Bones
Posts: 58
Joined: Sat Jun 27, 2009 1:49 pm

Re: Video#5

Post by Bones »

Uhmm, can I get the source for these files?
I don't see them here, I'll check the next tutorial and see if it's there but, I don't see it in this thread at least.

Also, my password isn't masking with x's.

is what I have for login

Code: Select all

<form method="POST" action="authenticate.php">
Username <input type="text" name="player" size="21">
Password <input type="text" name="password" size="21" mask="x">
<br>
<input type="submit" name="submit">
haven't typed out authen unless I have to just to understand it better.
mrmajic
Posts: 117
Joined: Sat Jun 27, 2009 9:37 am

Re: Video#5

Post by mrmajic »

Bones wrote:Uhmm, can I get the source for these files?
I don't see them here, I'll check the next tutorial and see if it's there but, I don't see it in this thread at least.

Also, my password isn't masking with x's.

is what I have for login

Code: Select all

<form method="POST" action="authenticate.php">
Username <input type="text" name="player" size="21">
Password <input type="text" name="password" size="21" mask="x">
<br>
<input type="submit" name="submit">
haven't typed out authen unless I have to just to understand it better.
all you have to do is change the line that reads:

Password <input type="text" name="password" size="21" mask="x">

to:

Password <input type="password" name="password" size="21">

done!
Mr Majic...

Current Project: http://www.deltarealm.net
feedback welcome.
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video#5

Post by hallsofvallhalla »

yep thats correct.
Post Reply

Return to “Older Browser MMO Videos”