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!

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"

Write the right request!
 

Attachments

You must be registered for see attachments list
Custom Title Activated
Loyal Member
Joined
Aug 23, 2010
Messages
1,544
Reaction score
423

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
899
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

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