Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Have you set $_SESSION['username'] when your user logs in?
  2. echo $sql to see what it actually looks like. Post it here if need be.
  3. You need to replace the comments with the code you want executed within those conditions.
  4. No one wants to sign up to some new product just to help you beta test. I sure as hell didn't provide an actual email address. If you want it tested, give us a demo username and password.
  5. Eventually you will run into issues with dependencies because certain versions of software and libraries might only work with other specific versions of software and libraries. Of course, if your testing before pushing to production you can test these thing first.
  6. Sounds like you should be using a faster moving distro then if these types of things concern you. Either that, or maintain your own packages, it's not really something I'd like to be responsible for though. We maintain a lot of servers at work, and besides security related updates and installing new software that we need, we only really update the systems and there software once every 12 months or so.
  7. Just a guess because we really have no idea how your code works: $this->setParams('username', ucfirst($users->getInfo($_SESSION['user']['id'], 'username'))); ps: The idea of changing the format of a users name is not something I would recommend doing.
  8. Are there particular features you are looking to use that aren't available in the current Debian versions? Servers aren't like desktop computers, you generally don't try and run the very latest versions of software. That is the entire reason Debian is a bit behind, because it is well tested and stable.
  9. This topic has been moved to Microsoft IIS. http://www.phpfreaks.com/forums/index.php?topic=358095.0
  10. trq

    update

    You need to schedule it using cron then, nothing at all to do with PHP.
  11. Unless you have a specific reason for compiling php yourself your generally better off leaving it to be maintained by your distros developers IMO. It's just much easier to keep things in sync.
  12. Look at any of the big sites. Facebook, Twitter they all use https for all pages.
  13. IMO you should use https on *all* pages.
  14. <?php session_start(); if (!isset($_SESSION['username'])) { // use is not logged in } else { // user is logged in }
  15. You might want to create a demo user and password as well as your registration page doesn't seem to work.
  16. session_register has long been deprecated and has since been removed in the latest version of PHP. Just use the $_SESSION array. <?php session_start(); echo $_SESSION['username']; ?> Don't forget you also need a call to session_start on all pages that use sessions.
  17. Remove this line: $sql_assoc = mysqli_fetch_assoc($sql_run);
  18. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=358085.0
  19. Classes are made up of data (properties) and methods to access and manipulate this data. Classes should be designed to have a clear publicly accessible interface. Any other properties or methods that are used to manipulate the data within your class but aren't necessarily useful outside of your class should be made private so as to not confuse the public interface. Maybe an example will help. Lets say you have a User class that represents a User of your application. Now, lets just say for some odd reason that all usernames in your application need to be displayed in all caps. You can build this functionality into the class itself, but there would be no need to make this functionality publically accessible because it is really just to manipulate the classes data. class User private $username; public function __construct($id) { // some code to get user info form the database $this->username = $username; } public function getUsername() { return $this->makeCaps($this->username); } private function makeCaps($str) { return strtoupper($str); } } As you can see by this example. It makes no sense to make the makeCaps() method public as it really has nothing to do with a User. It is simply used internally to manipulate User data.
  20. This topic has been moved to Editor Help (Dreamweaver, Zend, etc). http://www.phpfreaks.com/forums/index.php?topic=358057.0
  21. Aww, so sorry. It was json_decode not json_parse. It must have been very difficult to search the manual for the word *json*.
  22. This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=358008.0
  23. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=358003.0
×
×
  • 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.