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 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 49
  1. #21
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Or you could just remove $form, and don't put an else on the action, and the form will magically show again..

  2. #22
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    Thanks Caleb, I'm going to go with you and Beau's idea.

  3. #23
    Join Date
    Dec 2007
    Posts
    132
    Tokens
    0

    Default

    Quote Originally Posted by Dentafrice View Post
    Or you could just remove $form, and don't put an else on the action, and the form will magically show again..
    What ever floats your boat.
    There are no bad ways, only bad adventures lol

    waz ;]


  4. #24
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    There are bad ways of doing things.. :\ I'm not saying echoing out a variable is a bad thing, don't take it that way as it's just a way to do something..

    But there are appropriate and inappropriate ways of doing something.. like using sprintf here:

    PHP Code:
    $username "Bla";
    $password "blabla";

    $credentials sprintf"%s:%s"$username$password ); 
    when you could just as easily, and recommended do:

    PHP Code:
    $credentials "{$username}:{$password}"

  5. #25
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    New problem:

    PHP Code:
        mysql_query("UPDATE `users` (`firstname`, `lastname`, `nickname`, `location`, `email`, `gender`, `bio`, `favmovies`, `favmusic`, `favbooks`) VALUES ('".$fname."', '".$lname."', '".$nname."', '".$location."', '".$email."', '".$gender."', '".$bio."', '".$fmovies."', '".$fmusic."', '".$fbooks."',)"); 
    That code doesn't update the mysql database.

  6. #26
    Join Date
    Dec 2007
    Posts
    132
    Tokens
    0

    Default

    dunno if it does anything but theres a random comma at the end :]

    @ Dentafrice: is there a difference between
    '".$bio."' and '$bio'? Always wanted to know :]

    Waz ;]

    Last edited by wazup999; 17-11-2008 at 01:00 AM.


  7. #27
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Quote Originally Posted by BOX! View Post
    New problem:

    PHP Code:
        mysql_query("UPDATE `users` (`firstname`, `lastname`, `nickname`, `location`, `email`, `gender`, `bio`, `favmovies`, `favmusic`, `favbooks`) VALUES ('".$fname."', '".$lname."', '".$nname."', '".$location."', '".$email."', '".$gender."', '".$bio."', '".$fmovies."', '".$fmusic."', '".$fbooks."',)"); 
    That code doesn't update the mysql database.
    mysql_query( "UPDATE `users` (`firstname`, `lastname`, `nickname`, `location`, `email`, `gender`, `bio`, `favmovies`, `favmusic`, `favbooks`) VALUES ('$fname', '$lname', '$nname', '$location', '$email', '$gender', '$bio', '$fmovies', '$fmusic', '$fbooks')" ) or die( mysql_error() );


    Quote Originally Posted by wazup999 View Post
    dunno if it does anything but theres a random comma at the end :]

    @ Dentafrice: is there a difference between
    '".$bio."' and '$bio'? Always wanted to know :]

    Waz ;]

    ''s can't handle inline variables..


    PHP Code:
    $text "Hello, world!";

    echo 
    '$text'
    ^^ That won't work.

    PHP Code:
    $text "Hello, world!";

    echo 
    "$text"
    ^^ This will..

  8. #28
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    Caleb, when I use your code:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(`firstname`, `lastname`, `nickname`, `location`, `email`, `gender`, `bio`, `fav' at line 1

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

    Latest Awards:

    Default

    BOX! go and read a damn tutorial site and stop asking so many questions, 99% of them will be answered on a tutorial site.


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

  10. #30
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Quote Originally Posted by BOX! View Post
    Caleb, when I use your code:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(`firstname`, `lastname`, `nickname`, `location`, `email`, `gender`, `bio`, `fav' at line 1
    that's why you need to use UPDATE `table` SET `field`='$value', `field`='$value'

Page 3 of 5 FirstFirst 12345 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
  •