Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 33

Thread: First Line

  1. #11

    Default

    Quote Originally Posted by YabbereR View Post
    When i do coding (rearely and very badly )
    I usually start of with the configuration as people have said, then i usually get a basic login done,.
    Quote Originally Posted by Calon View Post
    The installation page would be a bad place to start, seeing as you haven't coded anything and you wouldn't know where to insert and what to insert.
    Quote Originally Posted by Tomm View Post
    A normally just copy my reusable database classes, etc. rather than remaking them for every project..
    Quote Originally Posted by Jackboy View Post
    Makes sense... I like to rewrite though, because i feel that after every script i do my PHP has improved slightly
    Quote Originally Posted by Excellent2 View Post
    If I'm making a usersystem or djpanel I usually kick off proceedings with my config file like so:

    PHP Code:
    <?php

    session_start
    ();

    $host "localhost";
    $dbuser "dbuser";
    $dbpass "dbpass";
    $dbname "dbname";

    $con mysql_connect("$host","$dbuser","$dbpass")
    or die(
    mysql_error());

    mysql_select_db("$dbname",$con)
    or die(
    mysql_error());

    $logged_in mysql_query("SELECT * FROM `table` WHERE `id` = '$_SESSION[id]' AND `password` = '$_SESSION[password]'");

    $logged_in mysql_fetch_array($logged_in);

    $sitename "Sitename";

    ?>
    Then will come register and login, functions and so on.
    Thanks for all the replies. I'm sure they'll come in handy for me and others.

  2. #12
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    For me the config file is the first file that should be made as it's connecting everything up to the database.
    Back for a while.

  3. #13
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Excellent2 View Post
    For me the config file is the first file that should be made as it's connecting everything up to the database.
    We all have our different ways of coding, you don't use classes, more advanced coders do. Not saying I'm advanced as I'm still learning OOP.

  4. #14
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Quote Originally Posted by Calon View Post
    We all have our different ways of coding, you don't use classes, more advanced coders do. Not saying I'm advanced as I'm still learning OOP.
    That made me lul quite hard

    OOP in php = lul, good method to learn OOP but PHP isn't even OOP yet (might need to wait till php 6 or 7). tbh if you wana do OOP go learn java

    The only reason I think OOP should be used is if you have multi instances, eg a chat engine.

    THIS PROBS SPARK UP SOME ARGUEMENTS
    Last edited by Protege; 12-12-2008 at 09:37 PM.
    Hi, names James. I am a web developer.

  5. #15
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Protege View Post
    That made me lul quite hard

    OOP in php = lul, good method to learn OOP but PHP isn't even OOP yet (might need to wait till php 6 or 7). tbh if you wana do OOP go learn java

    The only reason I think OOP should be used is if you have multi instances, eg a chat engine.

    THIS PROBS SPARK UP SOME ARGUEMENTS
    WOW? You were right about arguments.

    How the hell can you even suggest PHP isn't OOP yet?

    I don't really know you Protege, i only know you from your funny comments , but PHP is OOP. I promise you.

    I'm guessing your a procedural programmer?

  6. #16
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    You where the last person i'd expect to spark up an argument, So tell me what you using OOP for in your scripts etc
    Hi, names James. I am a web developer.

  7. #17
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Protege View Post
    That made me lul quite hard

    OOP in php = lul, good method to learn OOP but PHP isn't even OOP yet (might need to wait till php 6 or 7). tbh if you wana do OOP go learn java

    The only reason I think OOP should be used is if you have multi instances, eg a chat engine.

    THIS PROBS SPARK UP SOME ARGUEMENTS
    "The only reason I think OOP should be used is if you have multi instances, eg a chat engine."

    You clearly have no idea what you are talking about...

    I program in both Java and PHP and I can tell you that PHP is very much a OOP-capable language. The only thing it is really missing is namespaces which are due to be added very soon.

    So before you go off on your rant you might like to check your facts.

  8. #18
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Protege View Post
    That made me lul quite hard

    OOP in php = lul, good method to learn OOP but PHP isn't even OOP yet (might need to wait till php 6 or 7). tbh if you wana do OOP go learn java

    The only reason I think OOP should be used is if you have multi instances, eg a chat engine.

    THIS PROBS SPARK UP SOME ARGUEMENTS
    http://muffinresearch.co.uk/archives...-the-benefits/

    Haven't read it all, but:

    "Procedural code can be messy and hard to adapt later on. I currently work within a team of several developers where on occasion I have to modify other developer’s code. It’s usually the scripts which have utilised classes which can be quickly understood and changes be made without having to spend too much picking apart the code line by line to understand the flow."

    Seems pretty valid, if you are working on a site with more than one person.

  9. #19
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Quote Originally Posted by Calon View Post
    http://muffinresearch.co.uk/archives...-the-benefits/

    Haven't read it all, but:

    "Procedural code can be messy and hard to adapt later on. I currently work within a team of several developers where on occasion I have to modify other developer’s code. It’s usually the scripts which have utilised classes which can be quickly understood and changes be made without having to spend too much picking apart the code line by line to understand the flow."

    Seems pretty valid, if you are working on a site with more than one person.
    Fair play, but tell me what's wrong with having different "function" pages instead of classes, why do you use a class instead of an ordinary page of functions.

    Quote Originally Posted by Tomm View Post
    "The only reason I think OOP should be used is if you have multi instances, eg a chat engine."

    You clearly have no idea what you are talking about...

    I program in both Java and PHP and I can tell you that PHP is very much a OOP-capable language. The only thing it is really missing is namespaces which are due to be added very soon.

    So before you go off on your rant you might like to check your facts.<- thats ranting
    Just seeing your name i'd know you'd come up with some crap.

    Same question as I asked Jackboy
    So tell me what you using OOP for in your scripts etc

    "So before you go off on your rant you might like to check your facts."
    Why do I need to check my facts to give an opinion?
    Last edited by Protege; 12-12-2008 at 09:56 PM.
    Hi, names James. I am a web developer.

  10. #20
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Protege View Post
    Fair play, but tell me what's wrong with having different "function" pages instead of classes, why do you use a class instead of an ordinary page of functions.
    http://www.phpguru.org/article/classes-vs-functions

    To be honest, I just followed it as the other coders seemed to use it, then I was told it's a more advanced way, and now I've just found out that it's faster.

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •