Page 1 of 35

Browser MMO Video #5

Posted: Tue Jun 16, 2009 2:45 am
by hallsofvallhalla

Re: Video#5

Posted: Tue Jun 16, 2009 10:18 am
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

Re: Video#5

Posted: Tue Jun 16, 2009 12:00 pm
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

Re: Video#5

Posted: Tue Jun 16, 2009 1:23 pm
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]

Re: Video#5

Posted: Tue Jun 16, 2009 1:45 pm
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?

Re: Video#5

Posted: Tue Jun 16, 2009 4:55 pm
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!

Re: Video#5

Posted: Tue Jun 16, 2009 6:48 pm
by hallsofvallhalla
you are on the right track!

Re: Video#5

Posted: Tue Jun 30, 2009 4:19 am
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.

Re: Video#5

Posted: Tue Jun 30, 2009 4:34 am
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!

Re: Video#5

Posted: Tue Jun 30, 2009 1:44 pm
by hallsofvallhalla
yep thats correct.