Jump to content
Lizard Wizard Coding Club

Symphlion

Member
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Symphlion

  • Rank
    New member
  1. You can remove line 82. The DOCTYPE should ( and is ) declared at the top of your page. You can remove the second DOCTYPE as it serves no purpose.
  2. 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: if($status){ echo "Result set is positive"; }
  3. 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 $stmt->bind_result($blog_posts); // 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.
  4. 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. M
  5. 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.
  6. 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.
  7. 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 yo
×
×
  • Create New...