Browser MMO video #8
Re: video#8
It depends on how you want to do it.
Re: video#8
any way that will work.
if you love something, let it go.
if it doesnt return.....hunt it down and kill it.
if it doesnt return.....hunt it down and kill it.
Re: video#8
ok i got a login pic for my game. i will post it as soon as i get off this comp and when i get on the comp i have the pic on lol
and thanks to those who helped me : )
and thanks to those who helped me : )
if you love something, let it go.
if it doesnt return.....hunt it down and kill it.
if it doesnt return.....hunt it down and kill it.
Re: video#8
k here is my main logo
if you love something, let it go.
if it doesnt return.....hunt it down and kill it.
if it doesnt return.....hunt it down and kill it.
Re: video#8
Hi... I am making the game out your tutorial, but I cannot register or log in (I don't have any registered people there)
But, here is the codes:
register.php :
But, here is the codes:
register.php :
login.php:<?php
include 'connect.php';
?>
<form method ="post" action="reguser.php">
Type Username Here: <input type="text" name="player" size="21"><br>
Type Password Here: <input type="text" name="password" size "15"><br>
ReType Password Again: <input type="text" name="pass2" size "15"><br>
Type Email Address: <input type="text" name="email" size "60"><br>
<input type="submit" value="submit">
euthenticate.php:<form method="POST" action="authenticate.php">
Username <input type="text" name="player" size="21">
Password <input type="text" name="password" size="21" mask="p">
<br>
<input type="submit" name="submit">
reguser.php:<?php
include_once 'connect.php';
session_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 "<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>";
}
}
?>
PLEASE, Help me =)<?php
include 'connect.php';
?>
<?php
$player=$_POST['player'];
$password=$_POST['password'];
$pass2=$_POST['pass2'];
$player=strip_tags($player);
$email=$_POST['email'];
$email=strip_tags($email);
if ($email == "")
{
echo "You didn't enter a email address!<br>";
echo " <A href='register.php'>Go back</a>";
exit;
}
if ($password==$pass2)
{
$isplayer="SELECT * from players where name='$player'";
$isplayer2=mysql_query($isplayer) or die("Could not query players table");
$isplayer3=mysql_fetch_array($isplayer2);
if(!$_POST['password'] || !$_POST['pass2'])
{
print "You did not enter a password<br>";
echo " <A href='register.php'>Go back</a>";
exit;
}
else if($isplayer3 || strlen($player)>21 || strlen($player)<1)
{
print "There is already a player of that name or the name you specified is over 16 letters or less than 1 letter";
echo " <A href='register.php'>Go back</a><br>";
exit;
}
else
{
$isaddress="SELECT * from players where email='$email'";
$isaddress2=mysql_query($isaddress) or die("not able to query for password");
$isaddress3=mysql_fetch_array($isaddress2);
if($isaddress3)
{
print "There is already a player with that e-mail address";
echo " <A href='register.php'>Go back</a><br>";
exit;
}
else
{
$password=md5($password);
$SQL = "INSERT into players(name, password, email, level, exper, attack, defense, hpoints, maxhp) VALUES ('$player','$password','$email','1','0','5','5','30',)";
mysql_query($SQL) or die("could not register");
print "Thank you for registering!";
}
}
}
else
{
print "Your password didn't match or you did not enter a password";
echo " <A href='register.php'>Go back</a><br>";
exit;
}
echo " <A href='login.php'>Login Page</a><br>";
?>
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: video#8
what is the error you are getting?
Re: video#8
it looks like your missing the closing <form> tags on the register and login scripts... whether this will have any effect or not i dont know. but having a quick scan through thats the only problem i can see
New Site Coming Soon! Stay tuned 

Re: video#8
Umm... Not working =(
In register.php it says: could not register
In login.php it says: Wrong username or password.Try Again
What can be the problem?
In register.php it says: could not register
In login.php it says: Wrong username or password.Try Again
What can be the problem?
Re: video#8
put this on the end of your querys... or die(mysql_error()) rather than putting you own die message in...
New Site Coming Soon! Stay tuned 

Re: video#8
it did that to me once but I redid my reguser and ot started working
Coding-PHP, Javascript, C++, HTML, mySQL
Modeling/Art-Blender, GIMP
Games-Unity, Game Maker 8
Modeling/Art-Blender, GIMP
Games-Unity, Game Maker 8