Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. You're confusing closing a function with closing a block of PHP. You really need to keep the HTML and PHP separate, and not end and start PHP within a function, or even a file. Read KevinM's post with the part about "Well-formed PHP apps look like this:"
  2. The table needs to contain all the data that you think is relevant. Files should not be stored in databases, but in the filesystem. You would store the location of the file in your table.
  3. I'd get rid of that book. <?php = start of PHP ?> = end of php. You've stated you think <?php will "close" the PHP and that's not true.
  4. Well that's an entirely new error, and you should be able to compare the old one to see the original error. empty() works on variables, and you're using a method which probably returns nothing if it's empty. So there's no variable.
  5. Then rewrite it from scratch, no copying and pasting, and maybe you won't make the same mistake.
  6. Apparently the lack of twitter is making someone laugh like an evil maniac.
  7. That's nothing to do with what we suggested, if you try what I actually suggested, you'd see that your query will never update the information.
  8. You realize your htaccess file is a completely different thing from your php script right? Re: str_replace - see my signature
  9. Do that, and then also run the SQL in an interface like phpMyAdmin to make sure it works.
  10. If you're having that much trouble with this one, try formatting it more simply at first. This is a complex line of code the way you have it and you aren't able to spot the error. Here's your code made more simple IMO. I left in your error, and moved the ternary stuff out of the array and into an if. Do you see the error now? <?php $src = 'assets/peach/img/sprites/userinfo/avatars/avatar.png'; if(!empty($this->session->userdata('avatar'))){ $src = 'assets/peach/img/sprites/userinfo/'.$this->session->userdata('avatar'); } $image_properties = array( 'src' => $src, 'height' => '80px', 'width' => '80px', 'alt' => 'Avatar' ) );
  11. First, don't use globals, pass the variables as arguments. Secondly, you should be able to just echo the $time. If you want to format it, you can use strtotime and then date. Or use the php DateTime library.
  12. MPN is the value in the name column. The gibberish that I suspect you want is the value of the `value` column. Rather than echoing $productattributes['MPN'] you would echo $productattributes['value']
  13. Jessica

    the ASTERISK

    If you ask the same question 5 times over, by the sixth time no one gives a damn whether your feelings get hurt. You're asking people to coddle you because you can't be bothered to read the responses. I already have a baby to take care of, this forum is not it.
  14. You need a date_created and a date_modified field.
  15. In order for that code to generate that output, it must be inside another loop. I'm not 100% sure but I don't think you're using the function correctly. do a print_r($sort_cost); after the multi sort, it is sorted?
  16. Step one: User enters their username OR email OR both. Step two: You generate a random key and store it with the current time in the database. Step three: You email the user a link like site.com/reset_password.php?key=hds743ydsaak (to their email you already have stored in the DB) Step four: That page asks the user for their username and the key (which can auto fill from the URL). Step five: If the key matches the username and it's not been too long (24 hours is generally plenty), then either: a. allow them to choose a new password b. Mail them a new password and they can change it after they login.
  17. That was correct, I don't know what you are still confused about. Did you change it? If so post the updated code. Remove that section from the foreach.
  18. I see a problem. The last sentence probably won't have a space after the period.
  19. You've pasted way too much code for us to go through. Post just the relevant section, and the query.
  20. But path_parts[0] is NEVER going to be 'user'.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.