Jump to content
Killersites Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About zhafran

  • Rank
    New member
  1. Thanks for your explanation, Ben One more thing to clear and this is because I always see the same variable in your code. So I get confuse whether it is same variable or the other one. Consider this line $_SESSION[$type][] = $value; and foreach($_SESSION[$alert] as $value) Both variable is same which is $value and both is an assignment to the same session (you mention earlier post). So this is just like confuse me a little bit
  2. Really? What I saw in the video you only set the variable like this : private $alertTypes; Or maybe I just missed seeing Ok enough for that part. Still not clear but better than before. I have one more question. This one is about getAlert() Consider this line : if (isset($_SESSION[$alert])) Is it the session come from this line : $_SESSION[$type][] = $value; If not, I need your explanation. Sorry to trouble you, Ben.
  3. Thanks for your reply Still staring at the codes to understand the real process. Hopefully the thing will clicks soon Ok when we say : $type = $this->alertTypes[0]; What I understood right now is, we want to replace the $type with $this->alertTypes and put the node 0 to it. Like this : $type[0] Am I right?
  4. Hi there, I'm working on Ben Falk's PHP Login Using OOP & MVC and I need detailed explanation about this function : function setAlert($value, $type = null) { if ($type == '') { $type = $this->alertTypes[0]; } $_SESSION[$type][] = $value; } What really the use of the blank array and how it works really? Hopefully Ben or anybody can explain it deeply because I just a beginner here. Thanks!
  5. Nah! The error all fixed now and I learned something new today Thanks a lot Ben! You're really the legend here
  6. Thanks Ben! The error gone already now One more thing, when I try to add new record, I got this error on records.php Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\test\crud-mysqli\records.php:42) in C:\xampp\htdocs\test\crud-mysqli\records.php on line 64 Is it because the doctype that I use that cause this error?
  7. Thanks Andrea to spend your time replying my topic. Although you not answering my question but it's great to see some reply from expert in noob's thread like me
  8. Thanks Ben, I tried many times to fix this 2 issue here ('header' and 'last name cannot be NULL') but really don't have an idea what's going wrong. Really appreciate your help!
  9. Anybody home? Or do I need edit my question to be more specefic to get answer here? Thanks
  10. Hello all, Currently I'm working with Ben Falk's tutorial on PHP CRUD Videos and I got my head spinning with some errors I'm stuck at video part 5 and below is my code (which I did based on the videos) for your reference (to help me ): <?php include ('connect-db.php'); function renderForm($first = NULL, $last = NULL, $error = NULL, $id = NULL) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-T
  • Create New...