Problem, As Make Reg

11/02/2011 14:40 ulan222#1
Hi somebody can Describe exactly as make reg for vsro have code php but something it does not want to connect with base. We do not know problem. Be in that.
So, if they were write or give`s links for tutorial but I would be thankful such exact. Thx
11/02/2011 15:29 badibatu22#2
you have to enable mssql connection for php
11/02/2011 16:02 ulan222#3
how to do it ???
11/02/2011 16:04 badibatu22#4
Quote:
Originally Posted by ulan222 View Post
how to do it ???
[Only registered and activated users can see links. Click Here To Register...]
11/02/2011 16:42 ulan222#5
can you write me as Make exactly that reg
11/02/2011 16:55 Avalance Danger#6
Quote:
Originally Posted by badibatu22 View Post
[Only registered and activated users can see links. Click Here To Register...]
Do you have brains?
11/02/2011 16:57 badibatu22#7
Quote:
Originally Posted by Avalance Danger View Post
Do you have brains?
no i have just 1 brain its enough for me thanks for asking
11/02/2011 21:04 H34D_B4NG3R#8
Here is the php code
Quote:
<?php
/* Simple registration page for silkroad server, by Chernobyl
* Settings are at _inc/config.php
* If you get an mssql connection error, while defining totally correct data
* Just use older ntwdblib.dll for your webserver
*/
require_once('_inc/security.class.php');
require_once('_inc/config.php');

if(!isset($_POST['submit']))
{
echo "<table border='1'>
<form method='post'>
<td>Username</td><td><input type='text' name='username' maxlength='16'></td><tr/>
<td>Password[1]</td><td><input type='password' name='pw1' maxlength='32'></td><tr/>
<td>Password[2]</td><td><input type='password' name='pw2' maxlength='32'></td><tr/>
<td></td><td><input type='submit' name='submit' value='Register'></td>
</form>
</table>";
}
else
{
if(strlen($_POST['username']) < 3) $msg[] = "Username too short";
if(strlen($_POST['username']) > 16)$msg[] = "Username too long";
if(strlen($_POST['pw1']) < 6) $msg[] = "Password [1] too short";
if(strlen($_POST['pw1']) > 32)$msg[] = "Password [1] too long";
if(strlen($_POST['pw2']) < 6) $msg[] = "Password [2] too short";
if(strlen($_POST['pw']) > 32) $msg[] = "Password [2] too long";
if($_POST['pw1'] != $_POST['pw2']) $msg[] = "Passwords are not the same";

$sec = new security();

if($sec->is_secure($_POST['username']) == false) $msg[] = "Username contains forbidden symbols";
if($sec->is_secure($_POST['pw1']) == false) $msg[] = "Password [1] contains forbidden symbols";
if($sec->is_secure($_POST['pw2']) == false) $msg[] = "Password [2] contains forbidden symbols";

if(count($msg) > 0)
{
for($i = 0; $i < count($msg); $i++)
{
echo $msg[$i]."<br/>";
}
return;
}
else
{
//checking damn mssql stuff
$accountExists = mssql_num_rows(mssql_query("select StrUserID from TB_User where StrUserID='$_POST[username]'"));
if($accountExists > 0) echo "Account with such username already exists<br/>";
else
{
$pwd = md5($_POST['pw1']);
mssql_query("insert into TB_User(StrUserID,password,sec_primary,sec_seconda ry) values('$_POST[username]','$pwd','3','3')");
echo "Account successfully created<br/>";
}
}


}
11/08/2011 23:43 Avalance Danger#9
Quote:
Originally Posted by H34D_B4NG3R View Post
Here is the php code
I'm using xampp,
is there any solution for this:
Code:
Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\_inc\config.php on line 9
11/08/2011 23:46 OutlawNL#10
Quote:
Originally Posted by Avalance Danger View Post
I'm using xampp,
is there any solution for this:
Code:
Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\_inc\config.php on line 9
Yup delete your server.
11/10/2011 00:24 Avalance Danger#11
Quote:
Originally Posted by OutlawNL View Post
Yup delete your server.
Any other solution?