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 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Jul 2004
    Location
    California
    Posts
    8,725
    Tokens
    3,789
    Habbo
    HotelUser

    Latest Awards:

    Default how can I edit only a certain thing in a file?

    I can't use a database though I wish I could. I have multiple accounts in a file database (a .php file) like this:

    [bob]
    login=bob
    pass=pwhere

    [frank]
    login=frank
    pass=duck

    and I want to be able to go to a certain webpage and I want it to be able to edit this file, but not all of it just one account at a time so I go to this edit page and it shows
    [frank]
    login=frank
    pass=duck
    for example then I save it and it updates just this user in the database file. Cutenews somehow does it and I can't figure out how, if anybody could help me I would appreciate this!
    I'm not crazy, ask my toaster.

  2. #2
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    it looks like an ini file lol, wouldnt it be easyer 2 use an array or somthing for php? o.0

  3. #3
    Join Date
    Jul 2004
    Location
    California
    Posts
    8,725
    Tokens
    3,789
    Habbo
    HotelUser

    Latest Awards:

    Default

    Quote Originally Posted by 01101101entor View Post
    it looks like an ini file lol, wouldnt it be easyer 2 use an array or somthing for php? o.0
    I can't change it, I made a script to add users to an ftp server which stores it in an ini file but now I want it to be able to edit these users. As well as a script for vhosts. Can it be done though?
    I'm not crazy, ask my toaster.

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

    Latest Awards:

    Default

    Ahh yes search on google..

    codewalkers + php file handling and read the guide. It helped me alot

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

    Latest Awards:

    Default

    Use:

    www.php.net/parse_ini_file

    If you want to load the file.

  6. #6
    Join Date
    Jul 2004
    Location
    California
    Posts
    8,725
    Tokens
    3,789
    Habbo
    HotelUser

    Latest Awards:

    Default

    I want to be able to load a certain part of the file then be able to edit just that part then be able to save it back to the file. None of this has that :S.
    I'm not crazy, ask my toaster.

  7. #7
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    I know this isn't answering your question but you would be much better using a database such as MySQL. The text based database may seem easier because you dont setup any database but for coding ease and server speed your better using SQL.

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

    Latest Awards:

    Default

    Quote Originally Posted by HotelUser View Post
    I can't use a database though I wish I could.
    Answers your question Tim :p

    I think he shud use a db too.

  9. #9
    Join Date
    Jul 2004
    Location
    California
    Posts
    8,725
    Tokens
    3,789
    Habbo
    HotelUser

    Latest Awards:

    Default

    Quote Originally Posted by Jackboy View Post
    Answers your question Tim :p

    I think he shud use a db too.
    Quote Originally Posted by Luckyrare View Post
    I know this isn't answering your question but you would be much better using a database such as MySQL. The text based database may seem easier because you dont setup any database but for coding ease and server speed your better using SQL.
    Like I said before I can't use an SQL database, it is build into the program where the config file is.
    I'm not crazy, ask my toaster.

  10. #10
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    3,285
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Jackboy View Post
    Answers your question Tim :p

    I think he shud use a db too.

    I am Tim, Luckyrare is Danny But anyway, it does work better if you use MySQL - I used to use flat file databases for all my PHP, but then I saw the light



    i used to be NintendoNews. visit my blog or add me on twitter.
    need help with vista? i am a microsoft certified technology specialist in configuring windows vista and connected home integrator.. pm me for help!


    "I am the way, the truth, and the life. No one comes to the Father except through me"
    John 14:6 (NIV)


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