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 1 of 4 1234 LastLast
Results 1 to 10 of 33

Thread: First Line

  1. #1

    Default First Line

    Hi,

    When you start a user system, DJ panel, SNS, or anything like that, what's the fist line of code you write, what's the first file you create?

    Just thought it'd be nice to know where you all start, whether it be the installation page, the core, the index... the list just goes on, and on.

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

    Latest Awards:

    Default

    Well my first line would be

    PHP Code:
    <?php
    First file is normally the database core. Depends what i'm making.

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

    Latest Awards:

    Default

    Create folders (includes, images)
    Create files (configuration.php - MySQL, class_library.php - Classes, index.php)

    Then I kick off coding.

  4. #4

    Default

    Quote Originally Posted by Calon View Post
    Create folders (includes, images)
    Create files (configuration.php - MySQL, class_library.php - Classes, index.php)

    Then I kick off coding.
    Thanks for your help.

  5. #5
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default

    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,.

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

    Latest Awards:

    Default

    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.
    Last edited by Calon; 11-12-2008 at 07:52 PM.

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

    Latest Awards:

    Default

    A normally just copy my reusable database classes, etc. rather than remaking them for every project..

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

    Latest Awards:

    Default

    Quote Originally Posted by Tomm View Post
    A normally just copy my reusable database classes, etc. rather than remaking them for every project..
    That's a good idea.

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

    Latest Awards:

    Default

    Quote Originally Posted by Tomm View Post
    A normally just copy my reusable database classes, etc. rather than remaking them for every project..
    Makes sense... I like to rewrite though, because i feel that after every script i do my PHP has improved slightly

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

    Latest Awards:

    Default

    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.
    Back for a while.

Page 1 of 4 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
  •