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!


Results 1 to 3 of 3

Thread: Minor PHP help

  1. #1
    Join Date
    Dec 2007
    Posts
    2,807
    Tokens
    0

    Latest Awards:

    Default Minor PHP help

    Ok, I have this code which writes to a text file. But when it does it writes it with a space infront. So "I am god" is written into the file as " I am god". I basically need the first space to be removed.

    Heres the code:
    <?php
    $name = $_GET["name"];
    $myFile = "data.txt";
    $ab = fopen($myFile, 'w');
    fwrite($ab, $name);
    fclose($ab);
    Header("Location: http://www.google.co.uk/");
    ?>

  2. #2
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by FlyDuo View Post
    Ok, I have this code which writes to a text file. But when it does it writes it with a space infront. So "I am god" is written into the file as " I am god". I basically need the first space to be removed.

    Heres the code:
    trim( $_GET[ 'name' ] );


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  3. #3
    Join Date
    Dec 2007
    Posts
    2,807
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Jewish Bear View Post
    trim( $_GET[ 'name' ] );
    Cheers mate, works well.

Posting Permissions

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