Jump to content
Killersites Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Drew2

  1. Yeah, I think it's all about constant practice - which can be tough given there are several coding languages. I've been told that young monks re-read holy texts tons of times in order to memorize them. So, perhaps taking this course once is good, but maybe not enough to reinforce everything to a master degree.
  2. Update: actually, this code doesn't quite do it. It does something else. So, I'd say the course could use some updating.
  3. Hello Jim, I understand your frustration. I was able to get through and understand the CRUD basics course. Yeah, 2 months is a pretty rough response time. I assume you've repeated the CRUD course a few times. If you haven't tried this already, I'd put your code in difchecker (https://www.diffchecker.com/) alongside the code you can download from the course. What I do is find a section that is probably giving trouble - it may be small. I'll copy the code I've written, and then copy the correct course code and paste it alongside one another. I tend to do this only af
  4. I like to use dif checker: https://www.diffchecker.com/ I copy a section of code that is correct (Ben's code), and then match it against what I have written. I tend to find errors that way.
  5. So here seems to be the stages leading up to $_SESSION['cart'] being set: First, someone clicks a link generated by m_products 'cart.php? id=' . $product['id'] Second, cart.php sees the product id in the url (generated by someone clicking the above link), and calls this function in m_cart.php to add a product: $Cart->add($_GET['id']); Third, m_cart.php starts this function: public function add($id, $num = 1) public function add($id, $num = 1) { //setup or retrieve cart $cart = array(); if(isset($_SESSION['cart'])) {
  6. Quick question: Why are there no periods bordering this php insertion? header("Location: $url"); I would expect it to look like this: header("Location: . $url . "); My guess, reading W3Schools and elsewhere is that both would amount to the same thing. I have to wonder though, it they amount to the same thing, why ever use the periods? -Seems like more work.
  7. Hello you wonderful coders you. I've been staring at this line of code (line 74 highlighted below) for a while in m_template.php, and want to share what it's doing. function getAlerts() { $data = ''; foreach($this->alertTypes as $alert) { if (isset($_SESSION[$alert])) { foreach($_SESSION[$alert] as $value) { $data .= '<li class="'. $alert .'">' . $value . '</li>'; } unset($_SESSION[$alert]);
  8. I'm on the PHP Logic with OOP section, and have what I think may be a pretty simple question. In v_login.php, where I see the login form, line 27 for example has this code: <input type="password" name="password" value="<?php echo $this->getData('input_pass'); ?>"> - This line of code takes the user input, and spits it into the form for the user to see. Then, in login.php, there is this code on line 30: $_SESSION['username'] = $Template->getData('input_user'); - this line of code adds to the $_SESSION variable. As v_login.php is included in login.php,
  9. Hello fellow coder fra168nk. I may have just figured out myself how include works. Imagine one document with the function of bouncing a ball. (D1) Then you have a second document with the request to actually bounce a ball (D2) For D2 to actually bounce a ball, it will need the help of D1. D1 is the tool with which D2 can bounce a ball. By writing, for example, include(D1) in D2, D2 now has access to the bouncing ball function in D1. D1 and D2 have become one document in a sense (in terms of one benefitting from the other). Although the documents are now one, in a
  10. Hello, I'm working through the login System using OOP in Stef's course. In the file m_template.php, there is this line of code: (Line 58) function setAlert($value, $type = null) { if ($type == '') { $type = $this->alertTypes[0]; } $_SESSION[$type][] = $value; } I'm trying to see how the highlighted section of code is working. Ben explains this, but I don't quite understand yet. First of all, I want to check that my concept of the session variable $_SESSION is correct: If I unpack a hypothetical $_SESSION variable, it could
  11. I am pouring over the "simple" php login system code for Ben Falk's tutorial. There is one line of code that I cannot make sense of. After reading several sources online about prepared statements, I *only* ever see them with parameters (e.g. ?). Yet, in Ben's tutorial, there is a prepared statement without parameters in file register.php: // create select options $select = '<option value="">Select an option</option>'; $stmt = $mysqli->prepare("SELECT id, name FROM permissions"); $stmt->execute(); $stmt->bind_result($id, $name); // for more i
  12. Hello, Same problem for me. I'd like to continue with the course, but can't get past this question. Any suggestions? -Andrew
  13. In the course, we are asked to copy and paste code that validates a US phone number. I was unable to find the exact page used in the course. However, I found another page with code that produces the same result. Here is the page: https://jqueryvalidation.org/phoneUS-method/ Here is the code that makes it all work (the bold portions are what I copy and pasted in): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Validation Example</title> <meta http-eq
  14. Adding PHP Validation: Chapter 1 lesson 3 minutes: 2:30 -nutshell: If I understand Ben, he adds the php to the input tags in form.php so that when I enter my information in the form and hit submit, my information won't disappear. But, when I take all of the php out that Ben seems to use to keep my information from disappearing, I get the same result: my information stays there. Am I missing something? I have deleted temporarily all of the php echoes in the input tags in form.php (e.g. I deleted <?php echo $error['name'] ?> ). After I saved the page, I then refreshed the web
  15. https://developers.google.com/fonts/faq - found that. It says "The page load time indicator, located in the upper-right of the selection drawer, shows an estimation of how your selection will affect the overall load time (ex: slow, moderate, fast) of your page based on the number of families, styles, and scripts you’ve chosen in the “Customize” tab." It all sounds great, until I look for it. I've clicked on everything I can think of in the top right, and no mention of the page load time indicator is to be found. Best, Andrew
  16. In the video there is a page which has a page load indicator, with colors of green, yellow, and red (It sort of looks like a clock). If I remember, the colors indicate how fast the font will load. I cannot find the webpage on Google Fonts with that indicator, nor anything else having to do with the page load speed of any of the Google Fonts.
  17. Hello Stefan, I've been looking for the past 15 minutes for the page load indicator in Google Fonts. I can't find anything on Stack Overflow about the page load indicator in Google Fonts. I also haven't found anything in Google Font's FAQ on this. Any idea what is going on? It seems like font speed is important. Thank you for your assistance -Andrew
  18. Hello, I recently purchased the Complete Freelancer Videos, but all I found were mp3s. Pretty sure I followed the email instructions correctly. Any idea what is going on? -Drew
  • Create New...