Jump to content
MakeWebGames

Beryne

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by Beryne

  1.   NVM :p thanks
  2. I fixed the line Lithium pointed out, but now i get this error   I am not sure what you mean Danny?
  3. Im watching tutorials on how to program in php. I got to the point to where i create a registration page but when i go to register i get this error Notice: Undefined index: password in C:\xampp\htdocs\game\register.php on line 13 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''user' WHERE 'username' ='knjj2008'' at line 1 here is the code <?php include("functions.php"); connect();     ?> <?php if(isset($_POST['register'])){ $username = protect($_POST['username']); $password = protect($_POST['password']); $email = protect($_POST['email']); if(strlen($username) > 20){ echo "Username must be less than 20 characters!"; }elseif(strlen($email) > 100){ echo "E-mail must be less than 100 characters!"; }else{ $register1 = mysql_query("SELECT 'id' FROM 'user' WHERE 'username' ='$username'") or die(mysql_error()); $register2 = mysql_query("SELECT 'id' FROM 'user' WHERE 'email' ='$email'") or die(mysql_error()); if(mysql_num_rows($register1) > 0){ echo "That username is already in use!"; }elseif(mysql_num_rows($register2) > 0){ echo "That e-mail adress is already in use!"; }else{ $ins1 = mysql_query("INSERT INTO 'stats' ('gold','attack','defense','food') VALUES (100,10,10,100)") or die(mysql_error()); $ins2 = mysql_query("INSERT INTO 'unit' ('worker','farmer','warrior','defender') VALUES (5,5,0,0)") or die(mysql_error()); $ins3 = mysql_query("INSERT INTO 'user' ('username','password','email') VALUES ('$username','".md5($password)."','$email')") or die (mysql_error()); $ins4 = mysql_query("INSERT INTO 'weapon' ('sword',shield') VALUES (0,0)") or die(mysql_error()); echo "You have registered!"; } } } ?> Register <br /> <form action="register.php" method="POST"> Username: <input type="text" name="username"/><br /><br /> Password: <input type="password" name="username"/><br /><br /> E-mail: <input type="text" name="email"/><br /><br /> <input type="submit" name="register" value="Register"/>   </form>
  4. i created the database using xampp, what program do i use to iedit the data.sql file?
  5. i realized i didnt install the the game but i am getting an installation error when i try to install.  
  6. where do i go a locate the files to be fixed? in the mccode itself or xampp?
  7. i Got a few errors when i go to the register screen Notice: Undefined index: HTTP_X_FORWARDED_FOR in D:\Server\xamp\xampp\htdocs\register.php on line 37 Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in D:\Server\xamp\xampp\htdocs\mysql.php on line 2 Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in D:\Server\xamp\xampp\htdocs\mysql.php on line 3 Notice: Undefined index: username in D:\Server\xamp\xampp\htdocs\register.php on line 46
  8. Praise the cyber lord finally got it working, next step trying to register or log in to the game.
  9. Another newb here trying to set up McCode lite without a cPanel. I have downloaded and installed Xampp and was able to access the local host and the phpadmin, just to make sure everything was working right but now im to the point of setting up McCode lite. Im new at setting up a server and wondered how do i go about doing so. Right now I am going to run the server on my vista labtop.
×
×
  • Create New...