[Release] Register Form

04/14/2020 00:29 Nove240#1
Nulled.
04/14/2020 09:01 Musta²#2
The code is vulnerable in its current state, you'll need to prepare the first statement as well similar to the second, like this:

PHP Code:
if($password1 == $password2){
        
$rs odbc_prepare($connq"SELECT Count(*) AS counter FROM Auth.dbo.Accounts WHERE login_name=?");
        if(
odbc_execute($rs, array($user))) {
            
$arr odbc_fetch_array($rs);
        } else {
            echo 
"An error occured, please try again later.";
        } 
04/14/2020 10:50 1nternalError#3
Sql injection sends its regards to you
04/14/2020 11:21 YamatosDeath#4
slightly interesting
04/14/2020 18:29 Ghost Informatics#5
Good job as a beginner, keep trying and doing what you do and you'll do something great in the future.
04/15/2020 13:01 Nove240#6
I saw the SQL injection problem i will try to fix it

Think that if fixed, if you saw error please report it :)

Code:
<?php

if(isset($_POST['register'])){
  include 'Auth.php';
  $user = $_POST['User'];
  $password1 = $_POST['Pass1'];
  $password2 = $_POST['pass2'];

  if(!empty($user) && !empty($password2) && !empty($password1)){

      if($password1 == $password2){

    $rs = odbc_prepare($connq, "SELECT Count(*) AS counter FROM Auth.dbo.Accounts WHERE login_name = ? ");
        $rss = odbc_execute($rs, array($user));
        $arr = odbc_fetch_array($rs); 

    if($arr['counter'] == 0){

        $newpass = md5("2011".$password1);


      $req = odbc_prepare($connq, "INSERT INTO Auth.dbo.Accounts (login_name,password,referral_id,referral_code,pcbang,block,withdraw_remain_time,age,auth_ok,last_login_server_idx,event_code,server_list_mask,result,ip,game_code,gamecode,login_event,email) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
      $rep = odbc_execute($req, array($user,$newpass,'0','0','0','0','0','0','1','1','0','0','0','0','0','0','0 ','Mailed'));

      echo "Compte crée avec succès";

}else{
  echo "<br/>Ce compte existe déja, Désolé !";
}

  }else{
    echo "Les mots de passe ne correspondent pas !";
  }



  }else{


    echo "Les champs doivent etre tous remplis !";
  }


    

}

?>