Launcher UPDATES Section

Page 1 of 4 1234 LastLast
Results 1 to 25 of 93
  1. #1
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Launcher UPDATES Section

    Hey guys. Yesterday I started working on a launcher for personal use and well I have pretty much got it nailed. All I really need now is a logo and the updates section. What I mean by the updates section is like a slideshow with all the latest updates like the League of Legends launcher.



    My launcher was based off of a very old League of Legends launcher. I pretty much just used everything from that but meh here it is



    If anyone could help me get the slideshow like the league of legends launcher I would greatly appreciate it. I was up late trying many things and some things worked but they were not as professional as I wanted it to be and it didn't look very good.

    EDIT: I used iStu's launcher creator to make this. That thing is beast once you get to know all the features. Great application and without this wouldn't have been possible. Huge thanks. :)
    Last edited by fiestanerd69; 03-01-13 at 08:34 AM.


  2. #2
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    38 views no replies? D: Is everyone clue less or is it that you don't want to help me. :(

    I was expecting some of the more active people to reply within the first hour of this post lol. I've been let down greatly. :/

  3. #3
    Account Upgraded | Title Enabled! Crystalz is offline
    MemberRank
    Aug 2012 Join Date
    212Posts

    Re: Launcher UPDATES Section

    Write it in html, add a design and put it on your webhost then add a WebBrowser control to your form and make it connect to the URL where the html document is located. That's one way to do it. I think there's a WebBrowser control in Stu's Launcher Creator.
    Last edited by Crystalz; 03-01-13 at 04:57 PM.

  4. #4
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    Tried that. It kinda worked I guess. But I don't know I guess I was missing something. It just didn't look right? I guess I will have to look more deeply into that solution since it seems to work.

  5. #5
    Gruntilda Gruntilda is offline
    MemberRank
    Apr 2010 Join Date
    468Posts

    Re: Launcher UPDATES Section

    I hope you know, the Launcher Creator doesn't support the new Odin files, just sayin.

    But it looks good~

  6. #6
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    Yeah I just realised. Ah that sucks. D:

    I tried learning on my own how to use and make the new launcher for the new odin files like I did with this Launcher Creator (Rather Simple. Anyone could get it really) but I had no luck. :(

    Tried searching for guides, tutorials and I only found a couple of hints by myself and someone also posted something here:

    Quote Originally Posted by NextIdea View Post
    Your getting it a bit wrong!
    Launcher isn't going to generate the tokens, the Web server is going to.
    Launcher asks, for User/Pass and sends it to Web server, which then validates it and generates the token and then saves it to DB, after that it sends token back to the launcher and it starts the Client with it.
    When Client is started up it connects to the Login server which validates the token by asking the Web server (REST Server acts like it as default) and when its valid/notExpired it sends correct response back.
    Still no luck though. I have no experience in Visual Basics. That kind of sucks. I would like to learn via a tutorial or something or on my own through trial and error but I can't since I am not running the server myself and I just want to make the launcher for the future if I ever do start a server.

    So yeah any tips or hints or guides would definately be appreciated. I've tried many things. I first managed to find out that you have to enter the sql data into the Login.php and the Login.asp. I then continued to make a small login panel for the username and pass (just edited the example) and in the coding after the welcome message I did a bit of research and tried to make it open the client if it was correct (that failed). Did a bit more digging around the in examples coding but found nothing. So yeah if anyone can help me learn that would be awesome! :)

  7. #7
    -.- NextIdea is offline
    MemberRank
    Nov 2012 Join Date
    343Posts

    Re: Launcher UPDATES Section

    There is enough info to get all the data needed to get it to run. Just some things have to be found out with some different methods.

    Quote Originally Posted by NextIdea
    Your getting it a bit wrong!
    Launcher isn't going to generate the tokens, the Web server is going to.

    Launcher asks, for User/Pass and sends it to Web server, which then validates it and generates the token and then saves it to DB, after that it sends token back to the launcher and it starts the Client with it.
    When Client is started up it connects to the Login server which validates the token by asking the Web server (REST Server acts like it as default) and when its valid/notExpired it sends correct response back.
    LPL - Launcher programming language. (VB, C, C++, C#, ...)
    WSL - Web Server Language. (PHP, ASP, ...)
    1. Enter Username/Password to Launcher. Launcher asks, for User/Pass ...
    2. Send them to your web server: [LPL -> WSL]
    "http://localhost/GetToken.php?username="+username+"&password="+password
    ... and sends it to Web server, ...
    3. Web Server checks are they valid? [WSL]
    ($result = "SELECT [nEMID], [sUserpass] FROM [tAccounts]
    WHERE [sUsername] = $username" ) == $password
    ... which then validates it ...
    4. Generate a token: [WSL]
    "$token = GenerateRandomToken();"
    ... and generates the token ...
    5. Save it to Database: [WSL]
    "INSERT INTO [tTokens]([nEMID],[sToken])
    VALUES ($result[0],$token)"
    ... then saves it to DB, ...
    6. Return it Launcher: [WSL -> LPL]
    "echo $token."
    ... after that it sends token back to the launcher ...
    7. And start the Client with correct parameters: [LPL]
    Process.Start("Client.exe", "-osk_server 127.0.0.1 -osk_token "+tokenfromhttppage+" -osk_store YourGameStore")
    ... and it starts the Client with it.
    8. Wait for Client Load.
    9. Client sends data to LoginService. When Client is started up it connects to the Login server ...
    10. LoginService sends data to Web Server: [C++ -> WSL]
    "http://stubedore.t/user/v1/getInfo?realm=fiesta&token="+tokenfromlauncher+"&sig=LongHexString"
    Remap "stubedore.t" in hosts file.
    ... which validates the token by asking the Web server (REST Server acts like it as default) ...
    11. Web Server validates token: [WSL]
    ($result = "SELECT [tAccounts].[nEMID], [tAccounts].[sUsername] FROM [tAccounts], [tTokens] WHERE [tAccounts].[nEMID] = [tTokens].[nEMID] and [tTokens].[sToken] = '$token';) == true
    ... which validates the token by asking the Web server (REST Server acts like it as default) ...
    12. And sends result back: [WSL -> C++]
    "echo '{"token_age":0,"user_id":'.$result[0].',"login":"'.$result[1].'","user_role":"user","blocked":false}';"
    ... and when its valid/notExpired it sends correct response back.
    13. LoginService does whats necessary to get Client in game.

    If you don't know how to do specific step, Google it, as it is differs depending on the programming language.

  8. #8
    Account Upgraded | Title Enabled! Kreain is offline
    MemberRank
    May 2008 Join Date
    679Posts

    Re: Launcher UPDATES Section

    Quote Originally Posted by NextIdea View Post
    There is enough info to get all the data needed to get it to run. Just some things have to be found out with some different methods.



    LPL - Launcher programming language. (VB, C, C++, C#, ...)
    WSL - Web Server Language. (PHP, ASP, ...)
    1. Enter Username/Password to Launcher. Launcher asks, for User/Pass ...
    2. Send them to your web server: [LPL -> WSL]
    "http://localhost/GetToken.php?username="+username+"&password="+password
    ... and sends it to Web server, ...
    3. Web Server checks are they valid? [WSL]
    ($result = "SELECT [nEMID], [sUserpass] FROM [tAccounts]
    WHERE [sUsername] = $username" ) == $password
    ... which then validates it ...
    4. Generate a token: [WSL]
    "$token = GenerateRandomToken();"
    ... and generates the token ...
    5. Save it to Database: [WSL]
    "INSERT INTO [tTokens]([nEMID],[sToken])
    VALUES ($result[0],$token)"
    ... then saves it to DB, ...
    6. Return it Launcher: [WSL -> LPL]
    "echo $token."
    ... after that it sends token back to the launcher ...
    7. And start the Client with correct parameters: [LPL]
    Process.Start("Client.exe", "-osk_server 127.0.0.1 -osk_token "+tokenfromhttppage+" -osk_store YourGameStore")
    ... and it starts the Client with it.
    8. Wait for Client Load.
    9. Client sends data to LoginService. When Client is started up it connects to the Login server ...
    10. LoginService sends data to Web Server: [C++ -> WSL]
    "http://stubedore.t/user/v1/getInfo?realm=fiesta&token="+tokenfromlauncher+"&sig=LongHexString"
    Remap "stubedore.t" in hosts file.
    ... which validates the token by asking the Web server (REST Server acts like it as default) ...
    11. Web Server validates token: [WSL]
    ($result = "SELECT [tAccounts].[nEMID], [tAccounts].[sUsername] FROM [tAccounts], [tTokens] WHERE [tAccounts].[nEMID] = [tTokens].[nEMID] and [tTokens].[sToken] = '$token';) == true
    ... which validates the token by asking the Web server (REST Server acts like it as default) ...
    12. And sends result back: [WSL -> C++]
    "echo '{"token_age":0,"user_id":'.$result[0].',"login":"'.$result[1].'","user_role":"user","blocked":false}';"
    ... and when its valid/notExpired it sends correct response back.
    13. LoginService does whats necessary to get Client in game.

    If you don't know how to do specific step, Google it, as it is differs depending on the programming language.
    This brings back memorys from 2 years ago, haha

  9. #9
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    ^^ Wow everything is pretty much there! Thank you very much. I will see where I can get with this although it will be a struggle since I don't know php coding or visual basics but this will definitely help! Pretty much done it for me really. Just got to add it in now.

    EDIT: Does the php script that Stu has provided in his utility have all the webserver part coded when I checked it and looked at what you've written nextidea it seemed like it was missing stuff like generating the random token and from there onwards.
    Last edited by fiestanerd69; 04-01-13 at 12:56 PM.

  10. #10
    Alpha Member Cyndaquil is offline
    MemberRank
    Mar 2012 Join Date
    EnglandLocation
    2,137Posts

    Re: Launcher UPDATES Section

    Quote Originally Posted by Dragonluck4 View Post
    ^^ Wow everything is pretty much there! Thank you very much. I will see where I can get with this although it will be a struggle since I don't know php coding or visual basics but this will definitely help! Pretty much done it for me really. Just got to add it in now.

    EDIT: Does the php script that Stu has provided in his utility have all the webserver part coded when I checked it and looked at what you've written nextidea it seemed like it was missing stuff like generating the random token and from there onwards.
    probably since I think nothing was changed when it was released.

  11. #11
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    Hmm okay but, I still can't seem to get any where. I was wondering. Why do the username and password Terra/Rocks work without it checking with the server?

    EDIT: Oh, is it because it connects to his website or something?

    http://eslc.stubedore.com/login.php

    EDIT2: In the Login.php provided by iStu it says "mssql_connect" shouldn't it be "mysql_connect"?

    EDIT3: It should be mysql because I would not be using mssql

    EDIT4: What does this mean?

    Code:
    	$search=array("\\","\0","\n","\r","\x1a","'",'"');
    	$replace=array("","","","","","","");
    	return str_replace($search,$replace,$str);
    EDIT5: Okay this is what I have for the launcher can you guys check it. Also I wasn't sure how to declare the "tokenfromhttppage" variable (not sure if it's a variable?) I also changed that to GetToken because I thought it was cleaner like that. :)

    Code:
    Imports ExtrinsicStudioLauncherUtility
    
    Public Class Form1
    
    
        Dim ES_ErrorHandle As New ESLUErrorHandler
        Dim WithEvents ESWebUtil As New ES_WebUtility
        Dim ESLoginUtil As New ES_LoginUtility("") //url for the login.php which is on your web server
        Dim WithEvents ESRARUtil As New ES_RARUtility
    
        Dim LoginResponse As String = ""
        Dim iTotalFiles As Integer = 0
    
    
        ' ---------------- BEGIN LOGIN UTILITY EXAMPLE ---------------- 
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            LoginResponse = ESLoginUtil.Login(TextBox2.Text, TextBox3.Text, 1)
            If ES_ErrorHandle.Fail Then MsgBox(ES_ErrorHandle.WhyFail)
            If LoginResponse <> "OK" Then
                MsgBox("ERROR: " & LoginResponse)
            Else
                MsgBox("Welcome!")
                Process.Start("Client.exe", "-osk_server 127.0.0.1 -osk_token " + GetToken() + " -osk_store YourGameStore")
            End If
        End Sub
        ' ---------------- END LOGIN UTILITY EXAMPLE ----------------
    
        Private Function GetToken() As String
            Throw New NotImplementedException
        End Function
    
    
    End Class
    And this is what I have for my Login.php file.

    Code:
    <?php
    
    $conf['db_host'] = ".\SQLEXPRESS";
    $conf['db_user'] = "";
    $conf['db_pass'] = "";
    $conf['db_name'] = "Account";
    
    $user = sql_clean($_GET['Username']);
    $passhash = sql_clean($_GET['Password']);
    
    $con = mysql_connect($conf['db_host'],$conf['db_user'],$conf['db_pass']) or die('Database connect Fail.');
    $db = mysql_select_db($conf['db_name'], $con) or die('Database Init Fail.');
    
    $exec = mysql_query("SELECT sUserPW FROM tUser where sUserID = '$user'");
    
    if($exec)
    {
        if(mysql_num_rows($exec) != 1)
    	{
    		die('Account Not Found.');
    	}
    	$AccountData = mysql_fetch_assoc($exec);
    	$PlaintxtPass = $AccountData['sUserPW'];
    	if (MD5($PlaintxtPass) == $passhash)
    	{
    		die('OK');
    		$token = GenerateRandomToken();
    		INSERT INTO [tTokens]([nEMID],[sToken])
    		VALUES ($result[0],$token)
    		echo $token.
    		($result = "SELECT [tAccounts].[nEMID], [tAccounts].[sUsername] FROM [tAccounts], [tTokens] WHERE [tAccounts].[nEMID] = [tTokens].[nEMID] and [tTokens].[sToken] = '$token';) == true
    		"echo '{"token_age":0,"user_id":'.$result[0].',"login":"'.$result[1].'","user_role":"user","blocked":false}';"
    
    	} 
    	else
    	{
    		die('Wrong Password.');
    	}
    } 
    else
    {
    	die('Query Failed');
    }
    
    mysql_close();
    
    function sql_clean($str)
    {
    	$search=array("\\","\0","\n","\r","\x1a","'",'"');
    	$replace=array("","","","","","","");
    	return str_replace($search,$replace,$str);
    }
    ?>
    Last edited by fiestanerd69; 04-01-13 at 04:24 PM.

  12. #12
    -.- NextIdea is offline
    MemberRank
    Nov 2012 Join Date
    343Posts

    Re: Launcher UPDATES Section

    @Dragonluck4 EDIT 0,1:
    If they use old version of the files then they don't have the token system and the username/password are passed directly to client which then checks them.

    @Dragonluck4 EDIT 2,3:
    Why you want to use MySQL rather than MSSQL, your Database is MSSQL why you want to use 2 different Databases?

    @Dragonluck4 EDIT 4:
    It replaces in $str, each substring found from $search array, with corresponding element from $replace.

    @Dragonluck4 EDIT 5:
    It was very rough code, you can't directly copy most of the things from there, it just gives the basic idea and some basic code needed. (Do you need more explaining, why? I hope not.)
    Variable names are meant to be as close as to the data they hold, you can always change them as necessary.

    @CODE:
    VB: I'm not very good in VB, but the basic idea seems to be correct, except that when you login, server returns the token there, you don't ask it later with the "GetToken()". In your code the LoginResponse variable should get the token.
    PHP: The code after "die('OK');" needs to be recoded. Read comment on "EDIT 5" again.

  13. #13
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    Okay I think I got the launcher pretty much spot on unless there is a problem after I fix this problem, but for the life of me I can't figure out why I am getting this error on the login.php

    Fatal error: Call to undefined function mssql_connect() in ..... line 11

    I understand that it is an undefined function and that you need to define it but I thought it would be fine if the Login.php is placed on the webserver and then changing the

    ES_LoginUtility("http://127.0.0.1/Login.php")

    to your webserver where the Login.php is.

    Did I place the Login.php file in the wrong place or is the php file code un-complete?

    Thanks for all your help NextIdea and everyone else. I intend to put what I learn back into the community. :)

  14. #14
    Omega Ron is offline
    MemberRank
    Apr 2005 Join Date
    Location
    8,990Posts

    Re: Launcher UPDATES Section

    Code:
    Fatal error: Call to undefined function mssql_connect()


    Nothing wrong with the script, your server doesn't have mssql_() installed. Bring it up with your host / install the module in PHP.

  15. #15
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    Ah okay! That explained why it worked with mysql but gave me a different error lol. Thanks. Something so simple yet so hard. :|

  16. #16
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    Hey guys, I just setup my server to test my launcher and I got wamp installed with mssql extensions and all but when I press the play now button nothing happens. Also when I go to the login.php (127.0.0.1:9090/login.php) I get this error:

    Code:
    Notice: Undefined index: Username in C:\Users\Farbod\Desktop\WAMP\www\Login.php on line 8
    
    Notice: Undefined index: Password in C:\Users\Farbod\Desktop\WAMP\www\Login.php on line 9
    
    Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'tUser'. (severity 16) in C:\Users\Farbod\Desktop\WAMP\www\Login.php on line 14
    
    Warning: mssql_query() [function.mssql-query]: Query failed in C:\Users\Farbod\Desktop\WAMP\www\Login.php on line 14
    Query Failed
    I think this is the thing causing the problem. I don't think there is a tUser table? Is it just me or is it the login.php?

    This is the code for login.php:

    Code:
    <?php
    
    $conf['db_host'] = "FARBOD-PC\SQLEXPRESS";
    $conf['db_user'] = "raye";
    $conf['db_pass'] = "...";
    $conf['db_name'] = "OdinAccounts";
    
    $user = sql_clean($_GET['Username']);
    $passhash = sql_clean($_GET['Password']);
    
    $con = mssql_connect($conf['db_host'],$conf['db_user'],$conf['db_pass']) or die('Database connect Fail.');
    $db = mssql_select_db($conf['db_name'], $con) or die('Database Init Fail.');
    
    $exec = mssql_query("SELECT sUserPW FROM tUser where sUserID = '$user'");
    
    if($exec)
    {
        if(mssql_num_rows($exec) != 1)
    	{
    		die('Account Not Found.');
    	}
    	$AccountData = mssql_fetch_assoc($exec);
    	$PlaintxtPass = $AccountData['sUserPW'];
    	if (MD5($PlaintxtPass) == $passhash)
    	{
    		die('OK');
    	} 
    	else
    	{
    		die('Wrong Password.');
    	}
    } 
    else
    {
    	die('Query Failed');
    }
    
    mssql_close();
    
    function sql_clean($str)
    {
    	$search=array("\\","\0","\n","\r","\x1a","'",'"');
    	$replace=array("","","","","","","");
    	return str_replace($search,$replace,$str);
    }
    ?>
    Thanks for any help in advance :)

    EDIT: Would it been tAccounts instead of tUser?

    EDIT2: Okay I managed to sort out the invalid object name and query fail by changing it to this:

    Code:
    $exec = mssql_query("SELECT sUserPass FROM tAccounts where sUsername = '$user'");
    But I still get the undefined username and password problem. How can I define them?
    Last edited by fiestanerd69; 13-01-13 at 01:35 PM.

  17. #17
    -.- NextIdea is offline
    MemberRank
    Nov 2012 Join Date
    343Posts

    Re: Launcher UPDATES Section

    login.php?Username=user&Password=pass

  18. #18
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    I don't understand? i still get the undefined error.

  19. #19
    -.- NextIdea is offline
    MemberRank
    Nov 2012 Join Date
    343Posts

    Re: Launcher UPDATES Section

    Then read more about "php GET".

  20. #20
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    Holy mother of lord, it works! IT WORKS! YES :DDDD

    Thank you very much. :)

    Now onto updating, registering, ui and other stuff.

  21. #21
    ExtrinsicStudio™ Myth is offline
    MemberRank
    Jan 2012 Join Date
    367Posts

    Re: Launcher UPDATES Section

    The GET is requesting those variables from your browser, eg:

    http://localhost/login.php?Username=...word=(password)

    Example:

    http://localhost/login.php?Username=...ord=dirtycooch

  22. #22
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    Thank you Myth ^^

    I read up on it.

    PHP $_GET Variable

    EDIT: Never mind what I said before. After I click play the client loads and all but it says authentication failed? I don't know where to go with this.

    EDIT2: I think it is because I am using this code to start the client.exe

    Code:
    Client.exe", "-osk_server 127.0.0.1 -osk_token -osk_store Google
    But the problem is it doesn't make the token. :S and insert it into the above code.

    EDIT3:

    I have a code which generates the token now in the Login.php and I have changed the launcher to start as follows:

    Code:
    Client.exe", "-osk_server 127.0.0.1 -osk_token +RandomToken+ -osk_store Google
    But the problem is that when I click play I get this error:



    I've looked at it and apparently it says undefined variable: PlaintxtnEMID

    Then it has the token at the bottom.

    This is the part where it generates the token:

    Code:
            $Token = RandomToken(25);
    
            $setToken = null;
    
            if (mssql_num_rows(mssql_query("SELECT * FROM tTokens WHERE nEMID = '".$PlaintxtnEMID."'")) >= 1)
            {
                mssql_query("DELETE FROM tTokens WHERE nEMID = '".$PlaintxtnEMID."'");
                $setToken = mssql_query("INSERT INTO tTokens (nEMID, sToken) VALUES('".$PlaintxtnEMID."', '".$Token."')");
            }
            else
                $setToken = mssql_query("INSERT INTO tTokens (nEMID, sToken) VALUES('".$PlaintxtnEMID."', '".$Token."')");
    
            if ($setToken)
                die('OK'.$Token);
            else
                die('SetToken Error');
    Last edited by fiestanerd69; 13-01-13 at 08:10 PM.

  23. #23
    -.- NextIdea is offline
    MemberRank
    Nov 2012 Join Date
    343Posts

    Re: Launcher UPDATES Section

    Error says what's wrong, fix it.

    I suggest you to add very important parts to your code:
    Error checking!

  24. #24
    əʇılə ɯɐ ı fiestanerd69 is offline
    MemberRank
    Jun 2009 Join Date
    958Posts

    Re: Launcher UPDATES Section

    That's the thing T.T I don't know how to fix it else I would. :( Any tips, hints on how I could fix that? Like I have said before I don't know any PHP or VB lol. I've never ran a Fiesta server before.

    I found the code in another thread. :D

    I think there is already error checking because that's how I found the error?

    EDIT: I've looked at this: http://www.w3schools.com/php/php_variables.asp

    Yet no fix still comes to mind.

    EDIT: I WILL DEFINITELY FIX THIS ONE DAY! IDK WHEN BUT ONE DAY! I WILL! :)
    Last edited by fiestanerd69; 14-01-13 at 12:45 AM.

  25. #25
    -.- NextIdea is offline
    MemberRank
    Nov 2012 Join Date
    343Posts

    Re: Launcher UPDATES Section

    And the page has an answer:
    Code:
    PHP has no command for declaring a variable.
    
    A variable is created the moment you first assign a value to it:

    Error Handling would be correct (Not Error Checking).

    In your case, you have used nesting:
    Code:
    mssql_num_rows(mssql_query("..."))
    But can you guarantee that 'mssql_query("...")' returns resource?
    Code:
    mssql_query:
    Returns a MS SQL result resource on success, TRUE if no rows were returned, or FALSE on error.
    But 'mssql_num_rows' expects resource. But if boolean is given then you get yet another error.
    Code:
    mssql_num_rows — Gets the number of rows in result



Page 1 of 4 1234 LastLast

Advertisement