Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Web register

Newbie Spellweaver
Joined
Dec 30, 2017
Messages
31
Reaction score
1
Hello everyone, I'm getting into programming and I need your help!I'm trying to make a web registration and if I do I will share with you all!I need the right database queries!These are the queries I use!
Безымянный - Web register - RaGEZONE Forums
And it seems like I got all the information in the database! But when I try to enter the game, I get an error "Invalid login or password"
вфы - Web register - RaGEZONE Forums
Write the right request!
 

Attachments

You must be registered for see attachments list
Custom Title Activated
Loyal Member
Joined
Aug 23, 2010
Messages
1,529
Reaction score
403
Hello everyone, I'm getting into programming and I need your help!I'm trying to make a web registration and if I do I will share with you all!I need the right database queries!These are the queries I use!
View attachment 162254
And it seems like I got all the information in the database! But when I try to enter the game, I get an error "Invalid login or password"
View attachment 162255
Write the right request!

i think your registered account id isnt going to 1-2-3-4...
 
Upvote 0
◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜
Developer
Joined
May 29, 2007
Messages
2,167
Reaction score
898
You should provide us a snippet of your registration code.

Are you setting the id inside the array?
If you are, try to remove that line.

Also, try using the modern array syntax instead of the older one. You can just use brackets [ .. ] instead of array( .. ) the old syntax should be avoided in new PHP applications.
 
Upvote 0
Newbie Spellweaver
Joined
Dec 30, 2017
Messages
31
Reaction score
1
You should provide us a snippet of your registration code.

Are you setting the id inside the array?
If you are, try to remove that line.

Also, try using the modern array syntax instead of the older one. You can just use brackets [ .. ] instead of array( .. ) the old syntax should be avoided in new PHP applications.

<?php require_once 'connection.php'; ?>
<?php require_once 'library.php'; ?>
<?php

if(chkLogin()){
header("Location: home.php");
}
?>
<?php


if(isset($_POST['reg'])){

$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$temp = $_POST['pass'];
$options = array('cost' => 10);
$pass = password_hash($temp, PASSWORD_BCRYPT, $options);

$arrays = array(

"accountName" => $fname,
"email" => $fname,
"password" => $pass,
"pin" => $lname


);

$query = chkemail($email);
if($query){
register($arrays);
header("Location: login.php");
}
else{
echo "Email already registered!";
echo"<br>";
echo "Please <a href='register.php'>Register</a> with another email ID";
}
}


?>
 
Upvote 0
Back
Top