-- Forewarning --
The following is in no way shape or form intended for the use of beginners and requires basic and intermediate skill levels to apply and use.
-- Features --
-- Why do I need SQLSRV? --
MSSQL was dropped in PHP v5.3 -- the old registration scripts first put out in this community are designed to use the MSSQL_connect or MSSQL api. This can negatively impact the over-all performance of your website and is an inconvience. The SQLSRV Api was created as a replacement of the archaic MSSQL api, the syntax does not very all that greatly but did take a great deal of rewriting.
-- What do I need? --
To use this script your machine must be running PHP v5.3.8 (The Newest Version of XAMPP uses this version of PHP) and you must have SQLSRV 2.0 Installed.
!!XAMPP!! !!WARNING!! - Do NOT install in C:\Program Files or C:\Program Files (x86) install in C:\
You can get the latest version of XAMPP: [Only registered and activated users can see links. Click Here To Register...]
!!WARNING!!
SQLSRV2 requires that MS SQL Server Native Client 2008 R2 also be installed.
You can get this from [Only registered and activated users can see links. Click Here To Register...]
-- Installing SQLSRV 2.0 + Configuring your PHP.INI --
Download the requires DLL's + PHP.ini: [Only registered and activated users can see links. Click Here To Register...]
You will need to copy the PHP.ini to your XAMPP's PHP folder (Please overwrite if asked)
Move the other two files into your XAMPPS PHP\Ext folder, reload your server.
-- Configuring the Registration Script --
Download the SQLSRV Registration Script: [Only registered and activated users can see links. Click Here To Register...]
Copy 'index.php' to your web root e.g. 'htdocs' for XAMPP
Copy the 'function' folder into your web root as-well.
Open index.php and scroll down to:
Change the username, password and server_name with the details of your server. Save.
Open the conf.php in your 'function' folder edit the information you desire, save.
Restart your web server to ensure the changes have taken place.
-- Credits --
This script was originally designed by Demonroro.
This script was rewritten, optimized and converted to SQLSRV by iSmokeDrow
This script has been tested and confirmed functional.
Enjoy,
iSmokeDrow
The following is in no way shape or form intended for the use of beginners and requires basic and intermediate skill levels to apply and use.
-- Features --
- Username Check
- Password Confirm
- Password MD5 Encryption
- Age Field (For Server using; Adult Server)
- Email Field (Useful for Verifying Accounts / Blocking Dual Accounts)
- Email Check (Cuts down on Dual Accounters)
- IP Post (Posts the users IP to the IP field in the Accounts Database upon Account Creation) [Invisible to User]
- IP Check (Cuts down on Dual Accounters)
-- Why do I need SQLSRV? --
MSSQL was dropped in PHP v5.3 -- the old registration scripts first put out in this community are designed to use the MSSQL_connect or MSSQL api. This can negatively impact the over-all performance of your website and is an inconvience. The SQLSRV Api was created as a replacement of the archaic MSSQL api, the syntax does not very all that greatly but did take a great deal of rewriting.
-- What do I need? --
To use this script your machine must be running PHP v5.3.8 (The Newest Version of XAMPP uses this version of PHP) and you must have SQLSRV 2.0 Installed.
!!XAMPP!! !!WARNING!! - Do NOT install in C:\Program Files or C:\Program Files (x86) install in C:\
You can get the latest version of XAMPP: [Only registered and activated users can see links. Click Here To Register...]
!!WARNING!!
SQLSRV2 requires that MS SQL Server Native Client 2008 R2 also be installed.
You can get this from [Only registered and activated users can see links. Click Here To Register...]
-- Installing SQLSRV 2.0 + Configuring your PHP.INI --
Download the requires DLL's + PHP.ini: [Only registered and activated users can see links. Click Here To Register...]
You will need to copy the PHP.ini to your XAMPP's PHP folder (Please overwrite if asked)
Move the other two files into your XAMPPS PHP\Ext folder, reload your server.
-- Configuring the Registration Script --
Download the SQLSRV Registration Script: [Only registered and activated users can see links. Click Here To Register...]
Copy 'index.php' to your web root e.g. 'htdocs' for XAMPP
Copy the 'function' folder into your web root as-well.
Open index.php and scroll down to:
Code:
function connect(){
$serverName = "serverName\instanceName"; // Replace with your Computer Name \ Instance Name e.g. localhost\SQLEXPRESS
$usr="username"; // Replace 'Username' with the SQL User Name for your Account Database
$pwd="password"; // Replace 'Password' with the SQL Password for your Account Database
$db="server_name"; // Replace 'server_name' with the name of your account database e.g. Auth
$connectionInfo = array("UID" => $usr, "PWD" => $pwd, "Database" => $db);
$conn = sqlsrv_connect($serverName, $connectionInfo);
if( $conn )
{
echo "Connection established.\n";
}
else
{
echo "Connection could not be established.\n";
die( print_r( sqlsrv_errors(), true));
}
return $conn;
}
Open the conf.php in your 'function' folder edit the information you desire, save.
Restart your web server to ensure the changes have taken place.
-- Credits --
This script was originally designed by Demonroro.
This script was rewritten, optimized and converted to SQLSRV by iSmokeDrow
This script has been tested and confirmed functional.
Enjoy,
iSmokeDrow
If you found this post useful or enjoy my work be a sport and press the "Thanks" button.