Error Login Wrong Account Input

Status
Not open for further replies.
Newbie Spellweaver
Joined
Sep 3, 2011
Messages
36
Reaction score
0
I get the wrong account input when login with id ordinary, but in MSSQL already there ID which I created earlier, and when using a GM ID can login, can anybody help me? wherein mistake my settings
#google translate sorry for my bad english !
 
<?php
$mssql_host = "WIN-M72F2KFLMDA";
$mssql_user = "";
$mssql_pass = "";
error_reporting(0);
?>

<center>
<form action="regis.php" method="post">
<div style="width:350px; padding:18px;">
<h4><span class="label regis"><font color=red>Account</span></h4>
<input id="xlInput" class="xlarge" name="username" value="" style="width:100%; height:21px;" /><br>
<div style="height: 5px;"> </div>
<h4><span class="label regis"><font color=red>Email</span></h4>
<input name="email" value="" style="width:100%; height:21px;" /><br>
<div style="height: 5px;"> </div>
<h4><span class="label regis"><font color=red>Password</span></h4>
<input name="password" type="password" value="" style="width:100%; height:21px;" /><br>
<div style="height: 5px;"> </div>
<h4><span class="label regis"><font color=red>Confirm Pass</span></h4>
<input name="password2" type="password" value="" style="width:100%; height:21px;" /><br>
<div style="height: 5px;"> </div>
<h4><span class="label regis"><font color=red>Captcha </span></h4>
<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=6LflUcUSAAAAAM49-e3m-cMa8_PIrHdsLl7cDfa4"></script>
<noscript>
<iframe src="http://www.google.com/recaptcha/api/noscript?k=6LflUcUSAAAAAM49-e3m-cMa8_PIrHdsLl7cDfa4" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript> <div style="height: 5px;"> </div>
<p>
<input class="btn primary" type="submit" value="Create Account" />
</tr>
</table>
</form>

<?php
if (isset($_POST['username']) && $_POST['username'] != "") {

$username = $_POST['username'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = $_POST['email'];

if (strlen($username) < 3 || strlen($username > 15)) {
echo "Your username is too short or too long.";
} else if ($password != $password2) {
echo "Your passwords do not match.";
} else if (strlen($password) < 5 || strlen($password) > 20) {
echo "Your password is too short or too long.";
} else if ($email == "") {
echo "Please enter an email address.";
} else {
$con = mssql_connect($mssql_host, $mssql_user, $mssql_pass) or die("Failed to connect to MSSQL server.");
mssql_select_db("RF_USER", $con) or die("Unable to select database, no permissions or DB doesn't exist.");
$query = "INSERT INTO dbo.tbl_rfaccount (Id,Password,accounttype,email,birthdate) VALUES ((CONVERT (binary(16), '$username')),(CONVERT (binary(24), '$password')),'1', '$email' ,'01/01/1980')";
$res = mssql_query($query, $con);
if(!$res){
echo "Error inserting new account - query failed.";
} else {
echo "New account successfully created.";
}
}
}
?>
i have try with SQL Querry , no solved my problem:( , but GM ID sucess login,i have /open,and always Wrong id Selection
 
Upvote 0
if you change your register.php file you will still need to re-register the account, instead change the select procedure from rf_testaccount to rf_account in your sql database that way you can still use all the user that already been registered at your rf_account table
 
Upvote 0
like this??

Code:
$con = mssql_connect($mssql_host, $mssql_user, $mssql_pass) or die("Failed to connect to MSSQL server.");
        mssql_select_db("RF_USER", $con) or die("Unable to select database, no permissions or DB doesn't exist.");
        $query = $query = "[B]INSERT INTO dbo.tbl_rfaccount [/B] to [B]INSERT INTO dbo.tbl_rftestaccount[/B] (Id,Password,accounttype,email,birthdate) VALUES ((CONVERT (binary(16),  '$username')),(CONVERT (binary(24), '$password')),'1', '$email'  ,'01/01/1980')";
        $res = mssql_query($query, $con);
 
Upvote 0
like this??

Code:
$con = mssql_connect($mssql_host, $mssql_user, $mssql_pass) or die("Failed to connect to MSSQL server.");
        mssql_select_db("RF_USER", $con) or die("Unable to select database, no permissions or DB doesn't exist.");
        $query = $query = "[B]INSERT INTO dbo.tbl_rfaccount [/B] to [B]INSERT INTO dbo.tbl_rftestaccount[/B] (Id,Password,accounttype,email,birthdate) VALUES ((CONVERT (binary(16),  '$username')),(CONVERT (binary(24), '$password')),'1', '$email'  ,'01/01/1980')";
        $res = mssql_query($query, $con);

rftestaccount didnt use birthday
just see the table
 
Upvote 0
so like this??

Code:
$con = mssql_connect($mssql_host, $mssql_user, $mssql_pass) or die("Failed to connect to MSSQL server.");         mssql_select_db("RF_USER", $con) or die("Unable to select database, no permissions or DB doesn't exist.");         $query = $query = "[B]INSERT INTO dbo.tbl_rfaccount [/B] to [B]INSERT INTO dbo.tbl_rftestaccount[/B] (Id,Password,accounttype,email,bcodeTU) VALUES ((CONVERT (binary(16),  '$username')),(CONVERT (binary(24), '$password')),'1', '$email'  ,'1')";         $res = mssql_query($query, $con);
 
Upvote 0
Status
Not open for further replies.
Back