Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by Symphlion

  1. Ah wait a minute.. Im looking at a mysqli object.. I think.. I dont know, i never watch the video. However, i`m thinking something totally different right now.


    Do this;


    $status = $this->load_blog();

    echo $status;


    // And add this:



    echo "Result set is positive";


  2. Well, like I said, the $blog_posts is wrong. You are binding an empty ( not finished ) value which is weird.


    i`m referring to this:


    $blog_posts = $this->load_blog();


    // tadidumtida

    // No code has yet been returned by load_blog();

    // but somehow, you are binding it to the statement




    // The thing is, $blog_posts is not defined anywhere. It`s not magically appearing

    // $blog_posts should mean something, but in the current context, it doesn`t. It`s nothing.

  3. Hello everybody here at Killersite.com/community. My name is James McConnor, 24 years old, living somewhere in the Netherlands. Say what? It`s a country somewhere east of the UK, in case you were wondering. My hobby`s obviously include PHP but programming in general. I`m doing my Masters in Engineering, which is all cool but I have a close connection to Computer Sciences as well. It was a hard call, but the right one hopefully!


    My father is Scottish in case you thought: odd name for someone from the Netherlands.. However, I have no affiliation or what so ever in regard to my fatherland. My native language is Dutch, so forgive me for any weird spelling mistakes, I don`t do them intentionally :)


    Anyway, I`ve been programming for some time now. Safe to say I had my ups and downs. I never really stopped and really learned any particular language specifically, even though I manage to get my projects done. I started out with some simple HTML and soon learned CSS as well. After that, I started looking into C and C++ which got me hooked on programming. I built some small games in C++ and even created my own small library haha.


    After that, i started looking in to web programming. PHP was the obvious choice so I kinda stuck around to see how far that would get me. Turns out, I haven`t gotten there :) Which is one of the reasons I`m joining this community. Anyway, I hope this small intro will help clarify who I am. Hope to see you soon in the forums!



  4. Please explain. A header() forces the browser to go to a new page. It should stop executing that file inmediatly unless specified otherwise. If you don`t trust this, you can force the exit yourself like this:


    header("Location: path/to/new/file.php"); exit();


    It`s not a clean way of handling it, but it will stop executing that very page until PHP picks up on the new header location.


    Just remember, headers() can ONLY be sent while there is no output! So if you echo something out and start using the header(), you will trigger an error with something like: Headers already sent.

  5. Use classes. Using the first-child attribute is going to affect all first-child elements it can find. Either that or you should use it on the ul:first-child. That way, you only target the first li elements. However, this way, Coca Cola will not be highlighted since Coca Cola is not the first child of ul.

  6. Several things are going wrong, first of all, $blog_posts is currently infinity looping. $blog_posts = $this->load_blog(); While inside the load_blog(); you are using the $blog_posts to bind something. The thing is, you cannot bind them yet since there`s nothing returned before that function is done. So binding $blog_posts to the statement is a no-go.


    Second thing, not a biggy, is this: you are loading in blog_posts to display only if a user is NOT logged in. Users that have logged in, aren`t going to get any results. And either way, you should only start loading the $blog_posts if you know that you are going to need them. Now you load them regardless of whether you need them or not.

  • Create New...