[Help]How to make registration page ?

Results 1 to 6 of 6
  1. #1
    Member Danielkix10 is offline
    MemberRank
    Aug 2012 Join Date
    53Posts

    config [Help]How to make registration page ?

    How to make registration page in php to SQL server. At one time had Metin2 files and know how to make a registration page in php to MySQL but i think is not the same :/


  2. #2
    Enthusiast rainson is offline
    MemberRank
    Feb 2013 Join Date
    Hong KongLocation
    47Posts

    Re: [Q]How to make registration page ?

    DN may need to use ASP OR ASP.NET to make the register system...

    But I think php is also ok...

  3. #3
    Omega Male Abry is offline
    MemberRank
    May 2008 Join Date
    4,500Posts

    Re: [Help]How to make registration page ?

    Try this quick code I made: (Note: Not secured)

    Code:
    <html><head>
    <title>
    Basic Registration Page
    </title>
    </head>
    <body>
    <?php
    $sql_username = 'username';
    $sql_password = 'password';
    $dbName = "DNMembership";
    $serverName = "serverName\sqlexpress"; //serverName\instanceName
    
    
    $connectionInfo = array( "Database"=>$dbName, "UID"=>$sql_userName, "PWD"=>$sql_password);
    $conn = sqlsrv_connect( $serverName, $connectionInfo);
    
    
    if( $conn ) {
         ?>
    	 <form method='POST'>
    	 <label for='username'>Username:</label><input type='text' id='username' name='username'><br/>
    	 <label for='password'>Password:</label><input type='password' id='password' name='password'><br/>
    	 <input type='submit' value='Register'>
    	 </form>
    	 <?
    	 $user = $_POST['username'];
    	 $pass = $_POST['password'];
    	 mssql_query("
    	 GO
    	 DECLARE @return_value int
    	 EXEC @return_value = [dbo].[P_AddAccount]
    	 @nvcAccountName = N`$user`,
    	 @inyAccountLevelCode = 100,
    	 @inyCharacterCreateLimit = 4,
    	 @inyCharacterMaxCount = 4,
    	 @dt2LastLoginDate = NULL,
    	 @vchLastLoginIP = NULL,
    	 @IntLastSessionID = NULL,
    	 @vchJoinIP = NULL,
    	 @inyPublisherCode = 4,
    	 @inyGenderCode = NULL,
    	 @DaTBirthDate = NULL,
    	 @vchPassphrase = N`$pass`,
    	 @inyNationalityCode = NULL,
    	 @inyChannelPartnerCode = NULL
    	 SELECT 'Return Value' = @return_value
    	 GO
    	 ");
    	 
    	 sqlsrv_close();
    }else{
         echo "Connection could not be established.<br />";
         die( print_r( sqlsrv_errors(), true));
    }
    ?>
    </body>
    </html>
    Last edited by Abry; 20-01-14 at 01:03 AM.

  4. #4
    Member ikanbakar4 is offline
    MemberRank
    Aug 2011 Join Date
    62Posts

    Re: [Help]How to make registration page ?

    Yes Thorin , PHP made easy better than ASP / ASPX
    by the way thank you for your register script.
    I think i will mod it xD

    and the minus is :
    PHP more easy when use with MySQL database than MSSQL

  5. #5
    Member Danielkix10 is offline
    MemberRank
    Aug 2012 Join Date
    53Posts

    Re: [Help]How to make registration page ?

    Quote Originally Posted by Thorin View Post
    Try this quick code I made: (Note: Not secured)
    I have Problem with IIS

    Error Summary
    HTTP Error 500.0 - Internal Server Error
    The page cannot be displayed because an internal server error has occurred.
    Detailed Error Information
    Module FastCgiModule
    Notification ExecuteRequestHandler
    Handler PHP54_via_FastCGI
    Error Code 0x00000000
    Requested URL http://127.0.0.1:80/reg/register.php
    Physical Path C:\inetpub\wwwroot\reg\register.php
    Logon Method Anonymous
    Logon User Anonymous

    Most likely causes:


    IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
    IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
    IIS was not able to process configuration for the Web site or application.
    The authenticated user does not have permission to use this DLL.
    The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.

  6. #6
    Member ikanbakar4 is offline
    MemberRank
    Aug 2011 Join Date
    62Posts

    Re: [Help]How to make registration page ?

    had you install PHPManager for IIS ?
    you can use xampp webserver for easy manage about php file ^^



Advertisement