Browser MMO Video #5
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Browser MMO Video #5
[youtubehd]http://www.youtube.com/watch?v=2b_YIHQLP3U[/youtubehd]
Re: Video#5
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
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
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
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
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video#5
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]
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
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?
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?
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']
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
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!
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!
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video#5
you are on the right track!
Re: Video#5
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
haven't typed out authen unless I have to just to understand it better.
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">
Re: Video#5
all you have to do is change the line that reads: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 loginhaven't typed out authen unless I have to just to understand it better.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">
Password <input type="text" name="password" size="21" mask="x">
to:
Password <input type="password" name="password" size="21">
done!
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video#5
yep thats correct.