Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


PHP Programming .. news page - Page 2
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

PHP Programming .. news page

2»

Comments

  • @Mun said:
    Also, it wasn't funny at all.

    I found it funny. But de gustibus non est disputandum.

  • MunMun Member

    @Magiobiwan said:
    Mun but then they'd have something to pen-test with! That's probably how SolusVM writes their code!

    /me slaps @magibiwan with @bluevm.

    Mun

  • @Mun said:

    I dunno it was pretty funny..

    There's a bit of a difference between posting joke code on the internet and threatening to attack someone's network without them being around, but hey, keep saying stupid stuff on the internet you're bound to be right eventually (not this time, though).

  • MunMun Member

    @manacit said:
    There's a bit of a difference between posting joke code on the internet and threatening to attack someone's network without them being around, but hey, keep saying stupid stuff on the internet you're bound to be right eventually (not this time, though).

    No, fuck you. You are telling someone to put a code so that you can easily exploit the whole system.

    Don't go patronizing me about joking about a ddos towards clarke when you are telling someone actually asking for help and you give him the shit above. It is rather doubtful anything would come of mine, as I would actually have to DDOS him. However, your code is fully troll bait, and requires only a uneducated user to accidentally put it in and boom. You are giving some random troll the functionality to do what he wants and to have his LULZ. If anything you are a greater idiot then I, for simply thinking it would be funny. I also really hope LET staff removes your post.

    @liam, and If I am wrong about this. Please ban me from LET as I wouldn't want to be apart of such community.

  • Take some deeeeep breaths

  • debugdebug Member

    @serverian said:

    <?php
    > mysql_connect("hostname", "user", "password");
    > mysql_select_db("mydb");
    > $result = mysql_query("select * from news");
    > while ($row = mysql_fetch_object($result)) {
    >     echo $row->title;
    >     echo $row->text;
    > }
    > mysql_free_result($result);
    > ?>

    Taken from php.net

    Don't use any of the mysql_* functions, they are deprecated. Use either MySQLi or PDO (personally, I prefer PDO.)

    http://us2.php.net/manual/en/mysqlinfo.api.choosing.php

  • manacitmanacit Member
    edited July 2013

    In an effort to be more useful (and funnier) then Mun, let me give you some real code with PDO:

    <?php
    
    try {
        $conn = new PDO("mysql:host=localhost;dbname=DB", "USER", "PASS");
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        $data = $conn->query('SELECT * FROM news');
        foreach ($data as $row) {
            print_r($row);
        }
    } catch (PDOException $e) {
           error(false, "PDO ERROR: " . $e->getMessage());
    }
    

    ?>

    Untested, but I think it'll work. If you need more help feel free to drop me a PM!

  • netomxnetomx Moderator, Veteran

    @legendofalex said:
    gonna close this thread

    And then they wonder why we don't help

  • NickGHNickGH Member

    @Mun said:
    For anyone not PHP smart.... DO NOT PUT THIS CODE IN YOUR PHP SCRIPTS >THIS = BAD!!!!!!!!!!!!!!

    >

    Next @manacit, you come after me for "testing" ddos statements and yet >you are suggesting to someone to put a code that can quickly compromise >the whole server. GG!

    >

    Also, it wasn't funny at all.

    >

    Mun

    I agree It was not funny at all. I remember a sticky about something like that in the Ubuntu forums a while ago. Either help the man or not, do NOT scorn him for asking for help. you were not always this adept at what you do, remember your roots...
    @legendofalex if you need help pm me, I am no expert but i am pretty handy with php.

  • @NickGH You missed the part where I posted a proper PDO script to help and then offered to help him in PM (which I think he took me up on!). At the very least, I was more helpful than you :)

  • NickGHNickGH Member

    @manacit said:
    NickGH You missed the part where I posted a proper PDO script to help and then offered to help him in PM (which I think he took me up on!). At the very least, I was more helpful than you :)

    I did not miss it, I was simply agreeing with @mun . I saw the attempt at helping and I offered my own as well, that is all. Not trying to start a fight on here, just defending the poster.

  • netomxnetomx Moderator, Veteran

    They should add a guideline for questions

  • NickGHNickGH Member

    @netomx said:
    They should add a guideline for questions

    Questions or responses?

  • netomxnetomx Moderator, Veteran

    Questions. Questions like: hey can you help me with my php problem? Plz help!

    Will never get a good response.

    But if he asked this way:

    Hello, I have a mysql table with these columns: I'd, name, text and need to display it on php with an horizontal separator. can you help?

    See the difference?

  • NickGHNickGH Member

    I see the difference but whats having to ask for more details... not everyone is 100% prepared when they ask the question and sadly not everyone knows how to phrase it(language barrier, skill level, etc).

    Thanked by 1netomx
  • joepie91joepie91 Member, Patron Provider

    @NickGH said:
    I see the difference but whats having to ask for more details... not everyone is 100% prepared when they ask the question and sadly not everyone knows how to phrase it(language barrier, skill level, etc).

    Achieving a minimum standard of asking 'proper questions' is not a skill you need to learn - it is obvious to anyone that makes an effort to think about it. While some information may always be missing - and that's fine if you're not used to asking questions - there are certain things that should always be present in a question, and that's a list you can make from simple logic.

    Additionally, a good read on this topic is http://www.catb.org/esr/faqs/smart-questions.html.

  • SpiritSpirit Member

    @NickGH said:
    Either help the man or not, do NOT scorn him for asking for help. you were not always this adept at what you do, remember your roots...

    This!

Sign In or Register to comment.