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 3 FirstFirst 123 LastLast
Results 11 to 20 of 29
  1. #11
    Join Date
    Sep 2009
    Location
    Hull
    Posts
    827
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by badboyxlr View Post
    or, you could do it the easy way.. if (!$string){code for error}
    ... Or<?php if($things) code to execute ?>

    Lew.
    Im not here to be loved, I love to be hated :-}


  2. #12

    Default

    Yes, you could do that. But that is more for JavaScript.

  3. #13
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    2,015
    Tokens
    568

    Latest Awards:

    Default

    PHP Code:
    error_reporting(E_ALL); 
    For actual errors.

  4. #14

    Default

    no, to show "all" errors.

  5. #15
    Join Date
    Sep 2009
    Location
    Hull
    Posts
    827
    Tokens
    0

    Latest Awards:

    Default

    Or, to fix all troubles, error_reporting(0);

    Nuff said

    Lew.
    Im not here to be loved, I love to be hated :-}


  6. #16
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Oooooor spend less time bickering on forums and writing rather un-helpful tutorials and more time on learning more about the wonders of coding.

    Learn about objects, programming structures, security, speed and just general awesome before you get ahead of yourself and start trying to teach people yourself. Normally I'd ignore a thread like this, but the arrogance you seem to be conveying on your extremely amateur coding knowledge, plus being rude to Trinity ()... is just out of place.

    Spiffing.


    www.fragme.co = a project.

  7. #17

    Default

    *removed*

    moderator alert Edited by Trinity (Trialist Forum Moderator): Please do not be rude to other forum members/post to cause arguments.
    Last edited by Trinity; 23-03-2011 at 03:55 PM.

  8. #18
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    @ the if statement.. You're saying that's easy because you don't understand the power of the ternary operator. Do you even know how to use it, it's GREAT for situations, and I use it daily.

    Look bud, this isn't a tutorial, you're not helping people by posting code for people to "copy and paste" without even understanding what it is doing. It's different if you explain what mysql_query() does, how to handle errors from it, what it returns, etc.

    It's great you're "trying" to help, but when someone who knows an extreme amount more than you criticizes you, take that criticism to heart and listen, not act all big and bad like you know it all, because as we can all tell from your code.. you don't have any experience in programming in general.

    Edit: Just to prove that you are not an experienced programmer, because I have a feeling you're going to throw the "how do you know card", this is proof:

    PHP Code:
    mysql_query("CREATE DATABASE ".$dbname.",$con
    If you were an experienced programmer you'd know that this is sort of ironic. You're using double quotes ("") which means that the string WILL be parsed by PHP, yet you're terminating and using concatenation to parse the string. You don't need to close the " and concatenate the string with double quotes.

    PHP Code:
    mysql_query("CREATE DATABASE `{$dbname}`"); 
    Using double quotes and parsing does use more memory than single quotes. Could argue minimal, but in a large program it adds up.
    Last edited by Dentafrice; 23-03-2011 at 08:41 PM.

  9. #19

    Default

    and if you were an experienced programmer, you would know that that is invalid syntax.

  10. #20
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    2,015
    Tokens
    568

    Latest Awards:

    Default

    Quote Originally Posted by badboyxlr View Post
    and if you were an experienced programmer, you would know that that is invalid syntax.
    You're talking to Dentafrice, one of the most experienced and talented programmers that has ever blessed this forum with his presence. Do your research before you start casting aspersions.

Page 2 of 3 FirstFirst 123 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
  •