Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] Diablo → {Need Help} Registration Page.

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 3

1

Topic: {Need Help} Registration Page.

Righty so from wee while im trying to make this one to work could any one have a look and say wtf im doing wrong here ?
Im trying to force website to send data to my DB but still getting error with configuration on line 18.

<?php
include('../config/dbconf.php');

function encrypt($user, $pass) {
  $user = strtoupper($user);
  $pass = strtoupper($pass);
  return sha1($user.':'.$pass);
}

$username = $_POST['user'];
$password = encrypt($username, $_POST['pass']);
$email = $_POST['email'];


$count = 0;

THIS IS THE ERROR ROW
$stmt = $conn->prepare("SELECT uid FROM BNET WHERE user=:acct_username OR email=:acct_email LIMIT 0,1");
THIS IS THE ERROR ROW

$stmt->bind_param("s", $username);
$stmt->execute();
$stmt->store_result();
if($stmt->num_rows > 0) {
  $count = 1;
}

if($count == 0) {
  $sql = "INSERT INTO BNET (acct_username,acct_passhash1,acct_email) VALUES(?, ?, ?, ?)";
  $stmt = $conn->prepare($sql);
  $stmt->bind_param("sssi",$username, $password, $email);
  if($stmt->execute()) {
    echo "registered";
  }else{
    echo "Failed to register<br>" . $stmt->error;
  }
}else{
  echo "1";
}
?>

2

Re: {Need Help} Registration Page.

Check "BNET" table exists in your database. It often happens that tables are in lowercase and mysql server set up to use case dependent names. Or tables contain "pvpgn_" prefix.

Do not ask for support in PM.

3

Re: {Need Help} Registration Page.

or see if the prefix is at the beginning of "BNET"

Posts: 3

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 0 guests, 0 registered users

forums.pvpgn.pro → [EN] Diablo → {Need Help} Registration Page.