Custer Posted July 11, 2007 Share Posted July 11, 2007 Hey, I've been hosting a forum game that has been extremely successful, so I'm converting it into an online PHP based game. To give some background, the game is an industry type game with elements from Monopoly from it, where people build buildings, get products, sell and buy from a market that fluxes with the amount of product bought and sold, and just keep expanding. Unforunately, I'm a little new to PHP and MySQL, but am learning quickly. But I'm not sure how to do my users. I just installed some registration/login scripts that allow my users to make a username and password, and store their email and whatnot, but I'm not sure if I should make a new table for their buildings they have or anything. And for whether I should make a table for hte prices of the buildings, etc..,etc... If someone could steer me into the right direction, perhaps on an instant messenger, it would be great! Thanks! Link to comment https://forums.phpfreaks.com/topic/59472-user-management-help/ Share on other sites More sharing options...
trq Posted July 11, 2007 Share Posted July 11, 2007 I would suggest reading the link in my signiture. Sounds liek you have a long way to go. Link to comment https://forums.phpfreaks.com/topic/59472-user-management-help/#findComment-295549 Share on other sites More sharing options...
Custer Posted July 11, 2007 Author Share Posted July 11, 2007 Bah, but anyways, I'm trying to install a login/registration/admin panel from: http://evolt.org/node/60384 I went into the constants.php and specified everything that needed to be specified. So everything should be installed. But when I go to register.php, I get the following error message: Username: <input type="text" name="user" maxlength="30" value=" Fatal error: Call to a member function value() on a non-object in /www/newsit.es/b/a/r/barons/htdocs/register.php on line 65 I've ran through all of the documents twice now and it's just puzzling me. Here is the entire register.php code: <? /** * Register.php * * Displays the registration form if the user needs to sign-up, * or lets the user know, if he's already logged in, that he * can't register another name. * * Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC) * Last Updated: August 19, 2004 */ include("include/session.php"); ?> <html> <title>Registration Page</title> <body> <? /** * The user is already logged in, not allowed to register. */ if($session->logged_in){ echo "<h1>Registered</h1>"; echo "<p>We're sorry <b>$session->username</b>, but you've already registered. " ."<a href=\"main.php\">Main</a>.</p>"; } /** * The user has submitted the registration form and the * results have been processed. */ else if(isset($_SESSION['regsuccess'])){ /* Registration was successful */ if($_SESSION['regsuccess']){ echo "<h1>Registered!</h1>"; echo "<p>Thank you <b>".$_SESSION['reguname']."</b>, your information has been added to the database, " ."you may now <a href=\"main.php\">log in</a>.</p>"; } /* Registration failed */ else{ echo "<h1>Registration Failed</h1>"; echo "<p>We're sorry, but an error has occurred and your registration for the username <b>".$_SESSION['reguname']."</b>, " ."could not be completed.<br>Please try again at a later time.</p>"; } unset($_SESSION['regsuccess']); unset($_SESSION['reguname']); } /** * The user has not filled out the registration form yet. * Below is the page with the sign-up form, the names * of the input fields are important and should not * be changed. */ else{ ?> <h1>Register</h1> <? if($form->num_errors > 0){ echo "<td><font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font></td>"; } ?> <form action="process.php" method="POST"> <table align="left" border="0" cellspacing="0" cellpadding="3"> <tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr> <tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr> <tr><td>Email:</td><td><input type="text" name="email" maxlength="50" value="<? echo $form->value("email"); ?>"></td><td><? echo $form->error("email"); ?></td></tr> <tr><td colspan="2" align="right"> <input type="hidden" name="subjoin" value="1"> <input type="submit" value="Join!"></td></tr> <tr><td colspan="2" align="left"><a href="main.php">Back to Main</a></td></tr> </table> </form> <? } ?> </body> </html> Anyone care to help me out? Link to comment https://forums.phpfreaks.com/topic/59472-user-management-help/#findComment-295688 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.