Re: Register Page problems
Quote:
Originally Posted by
Huntix
hi guyzz i got problem with register pages when i try to register it says
Oh no, if only we knew what was on line 40....
Re: Register Page problems
o yea i forgot here is the code
Quote:
<?php
require('./configs/reg_conf.php');
function doesUsernameExist($name){
$exit = FALSE;
$result = @mssql_query("SELECT * FROM ACCOUNT_TBL WHERE account='$name'");
if (mssql_num_rows($result) != 0){
$exit = TRUE;
}
return $exit;
}
if(isset($_POST['submit'])){
$user = preg_replace ("[^A-Za-z0-9]", "", $_POST['username']);
$pass = preg_replace ("[^A-Za-z0-9]", "", $_POST['password']);
if($_POST['username'] == ""){
echo '<font color="red">Enter a user.</font><br /><br />';
}
else if($_POST['password'] == ""){
echo '<font color="red">Enter a password.</font><br /><br />';
}
else if ((strlen($_POST['username']) > 16) || (strlen($_POST['username']) < 3)){
echo '<font color="red">The user should be 3 to 16 characters.</font><br /><br />';
}
else if ((strlen($_POST['password']) > 16) || (strlen($_POST['password']) < 3)){
echo '<font color="red">The password should be 3 to 16 characters.</font><br /><br />';
}
else if($_POST['username'] != $user){
echo '<font color="red">User with invalid characters.</font><br /><br />';
}
else if($_POST['password'] != $pass){
echo '<font color="red">Password with invalid characters.</font><br /><br />';
}
else {
$pass = md5('kikugalanet' . $pass);
if(!doesUsernameExist($user)){
$stmt = mssql_init('webCreateAcc', $link);
mssql_bind($stmt, '@account', $user, SQLVARCHAR, false, false, 15);
mssql_bind($stmt, '@password', $pass, SQLVARCHAR, false, false, 36);
mssql_bind($stmt, '@email', $mail, SQLVARCHAR, false, false, 120);
mssql_execute($stmt) or die ("Something is wrong on the execution");
mssql_free_statement($stmt);
echo '<font color="Green">Register Successfull.</font><br /><br />';
}
else {
echo '<font color="red">User already Exist.</font><br /><br />';
}
}
mssql_close();
}
echo '<form action="#" method="post">';
echo 'Username: <input type="text" name="username" /><br />';
echo 'Password: <input type="password" name="password" /><br />';
echo '<input type="submit" name="submit" value="Register" />';
echo '</form>';
?>
and i am using this files http://forum.ragezone.com/f457/flyff...repack-658914/
Re: Register Page problems
Use this.
PHP Code:
<?php
require('./configs/reg_conf.php');
function doesUsernameExist($name){
$exit = FALSE;
$result = @mssql_query("SELECT * FROM ACCOUNT_TBL WHERE account='$name'");
if (mssql_num_rows($result) != 0){
$exit = TRUE;
}
return $exit;
}
if(isset($_POST['submit'])){
$user = preg_replace ("[^A-Za-z0-9]", "", $_POST['username']);
$pass = preg_replace ("[^A-Za-z0-9]", "", $_POST['password']);
if($_POST['username'] == ""){
echo '<font color="red">Enter a user.</font><br /><br />';
}
else if($_POST['password'] == ""){
echo '<font color="red">Enter a password.</font><br /><br />';
}
else if ((strlen($_POST['username']) > 16) || (strlen($_POST['username']) < 3)){
echo '<font color="red">The user should be 3 to 16 characters.</font><br /><br />';
}
else if ((strlen($_POST['password']) > 16) || (strlen($_POST['password']) < 3)){
echo '<font color="red">The password should be 3 to 16 characters.</font><br /><br />';
}
else if($_POST['username'] != $user){
echo '<font color="red">User with invalid characters.</font><br /><br />';
}
else if($_POST['password'] != $pass){
echo '<font color="red">Password with invalid characters.</font><br /><br />';
}
else {
$pass = md5('serus' . $pass);
if(!doesUsernameExist($user)){
$stmt = mssql_init('webCreateAcc', $link);
mssql_bind($stmt, '@account', $user, SQLVARCHAR, false, false, 15);
mssql_bind($stmt, '@password', $pass, SQLVARCHAR, false, false, 36);
mssql_bind($stmt, '@email', $user, SQLVARCHAR, false, false, 120);
mssql_execute($stmt) or die ("Something is wrong on the execution");
mssql_free_statement($stmt);
echo '<font color="Green">Register Successfull.</font><br /><br />';
}
else {
echo '<font color="red">User already Exist.</font><br /><br />';
}
}
mssql_close();
}
echo '<form action="#" method="post">';
echo 'Username: <input type="text" name="username" /><br />';
echo 'Password: <input type="password" name="password" /><br />';
echo '<input type="submit" name="submit" value="Register" />';
echo '</form>';
?>
Re: Register Page problems
I make an acc but when i try to log in its says Incorrect login details
Re: Register Page problems
Config can be from older mssql realeses?
Re: Register Page problems
Quote:
Originally Posted by
Huntix
I make an acc but when i try to log in its says Incorrect login details
If you're using serus's neuz.the hash is 'serus' not 'kikugalanet'
I edited the code in my 2nd post. Use that one instead of the code that was orignally in that post.
Re: Register Page problems
Quote:
Originally Posted by
Cuvvvie
Oh no, if only we knew what was on line 40....
made me LOL XD
but anyways have you helped him :):
Re: Register Page problems
Actually, kikugalanet worked for me. I didnt use any of those Serus stuff. I mean I think I used his neuz, but I didnt know about the serus salt, and used kikugalanet instead, that worked too ;)
Re: Register Page problems
Quote:
Originally Posted by
x2Fast4YouX
Actually, kikugalanet worked for me. I didnt use any of those Serus stuff. I mean I think I used his neuz, but I didnt know about the serus salt, and used kikugalanet instead, that worked too ;)
He said that the kikugalanet hash didn't work, so unless he fucked up, he doesn't have the same hash as you.
Usually all the kiddies that need help setting up the server are using serus's repack anyways.
Re: Register Page problems
Hello Cuvvvie
can i have detail of this :require('./configs/reg_conf.php')
Thanks
Re: Register Page problems
Quote:
Originally Posted by
willytang
Hello Cuvvvie
can i have detail of this :require('./configs/reg_conf.php')
Thanks
It basically gives the script info on what to connect to. Heres a DL link:
http://www.mediafire.com/?nz2ottk4ijy
[all credits to jason145]
Remember to put that file into a folder named 'configs'