Browser MMO Video #12

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

Re: Video #12

Post by hallsofvallhalla »

well not register or game over, but those havent changed in a while .

connect.php

Code: Select all

<?php

$db = mysql_connect("localhost","root","") or die("Could not connect to db");
if(!$db)
 die("no db");
if(!mysql_select_db("tutorial",$db))
 die("No Database Selected");
 
 ?>
logo.php

Code: Select all

<div id="login"><div align="center"><img src="images/logo.gif" width="354" height="71" border="0" />
login.php

Code: Select all

<form method="POST" action="authenticate.php">
User Name <input type="text" name="player" size="21">
Password <input type="password" name="password" size="21" mask="x">
<br>
<input type="submit" value="Login" name="submit">

<br><br>Not Registered? <a href='register.php'>Register
logout.php

Code: Select all

<?php
session_start();
session_destroy();


echo "Thanks for playing!";
echo "<br><a href='login.php'>Back to Login page";
?>
register.php

Code: Select all

<?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">
 

 <?php
      print "<select name='classchoice' length='20'>";
      $classinfo="SELECT * from classes";
      $classinfo2=mysql_query($classinfo) or die("Could not select classes");
      while ($classinfo3=mysql_fetch_array($classinfo2))
      {
        print "<option>$classinfo3[name]</option>";
      }
      print "</select><br>";
?>
</form>
<?php

      print "<center><h3>Class Starting modifiers</h3></center>";
      print "<center>";
      print "<table border='0' width='70%' cellspacing='20'>";
      print "<tr><td width='25%' valign='top'>";
      print "</td>";
      print "<td valign='top' width='75%'>";
      $selectclass="SELECT * from classes";
      $selectclass2=mysql_query($selectclass) or die("could not select Classes");
      print "<table border='1' bordercolor='black' bgcolor='#ffffff'>";
      print "<tr><td><font color='cc0033'>Class<font color='ffffff'>_____________</td><td><font color='cc0033'>Attack<font color='ffffff'>_</font><td><font color='cc0033'>Defense<font color='ffffff'>_</font></td><td><font color='cc0033'>Hit Points<font color='ffffff'>_</font></td><td><font color='cc0033'>Spell Points<font color='ffffff'>_</font></td></tr>";
      while($selectclass3=mysql_fetch_array($selectclass2))
      {
       print "<tr><td>$selectclass3[name]</td><td>$selectclass3[attack]</td><td>$selectclass3[defense]</td><td>$selectclass3[hpoints]</td><td>$selectclass3[spoints]</td></tr>";
          
      }
      print "</table>";
      print "</td></tr></table>";    
      print "</center>";
    
    
?>
User avatar
Hutch
Posts: 95
Joined: Wed Aug 12, 2009 11:12 pm

Re: Video #12

Post by Hutch »

All the code files and the sql file is underneath the video.
snowi
Posts: 3
Joined: Tue Sep 08, 2009 7:13 pm

Re: Video #12

Post by snowi »

Good that you bother to make such an MMO Tutorial.

I'm full of it at last,
But the first thing I have now started to do it.
But I can see there are some errors on login.
Since all new user can not login.

They are Wrong username or password.
Although it makes use within the database.

I can not see the error.

" is use google.translate from Danish to English"
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video #12

Post by hallsofvallhalla »

please post your authenticate.php and your reguser.php so we can look at them
snowi
Posts: 3
Joined: Tue Sep 08, 2009 7:13 pm

Re: Video #12

Post by snowi »

found errors.
Did not save the same place and there does not refresh. alså
authenticate.php and reguser.php. DOH
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video #12

Post by hallsofvallhalla »

i am not sure what you mean.

you found more errors?

or you figured out what was wrong?
snowi
Posts: 3
Joined: Tue Sep 08, 2009 7:13 pm

Re: Video #12

Post by snowi »

problem is resolved.

It was save problem
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video #12

Post by hallsofvallhalla »

ah,

very glad you got it working
Kevin1230
Posts: 62
Joined: Mon Jul 18, 2011 3:32 pm

Re: Video #12

Post by Kevin1230 »

hi,

what is the structure for these spells?

id
sclass
level
price
type
name
svalue
scost


As you can see in this video http://www.youtube.com/watch?v=yw9tfU7K ... page#t=59s

it didn't show the structure so please can you tell me the structure like the int, smallint the length values etc pls

+ Also can you tell me the structure for pclass in players and the structures for the ones in playermagic in phpmyadmin too pls
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video #12

Post by hallsofvallhalla »

id = mediumint(6)
sclass = varchar(15)
level = smallint(3)
price = int(9)
type = varchar(15)
name = varcahr(21)
svalue = medint(6)
scost = medint(6)

basically if they are caharacters then varchar and 21, if they are numbers then int(9)
Post Reply

Return to “Older Browser MMO Videos”