Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by requinix

  1. Then post the code for it so we can tell you what the problem was.
  2. There is in what you posted. But obviously it's just in the post, otherwise your script wouldn't run at all. The way you set up folders by using additional database tables is not good. There is no reason why anything should ever be done dynamically like that. Instead, you should have a list of folders, all messages should be in the same database table, and each should be marked with the folder it's in. ...Are you saying you currently get 50 per folder and you don't want it to be per folder? Because that is what the code does. The deal with using a list of folders and holding all the messages together would make this all very much easier. taquitosensei already replied, but you'll have more luck researching the concept on your own if you use the term pagination.
  3. Except for the fact that you hardcoded $page to 1 (and except for the syntax error), it looks right. Well, also except for the folder thing, that's really not good. I see you have some debugging output there. What do you see?
  4. Make a normal link to invoice.php and have the script do the redirect.
  5. Use one <a>. If you want it to look like a button then make it look like a button. Then add a target attribute to it. If that's still not working then post your current code. Everything that might be relevant. Not just the line with the link/button on it.
  6. I sure hope that was a joke. No, but if you want to trim your fingernails then nail clippers will be a better choice than a cleaver.
  7. It's easier when you contain all your mailing work in one single location instead of spreading calls to it throughout your application. It's perfectly acceptable to create your own mailing class that uses PHPMailer to do the work. Don't worry about those files. It should be mentioned somewhere, but otherwise it's mostly implied.
  8. If, on the other hand, you don't want to have to reinvent the wheel with concepts like MVC or databases, then most people nowadays recommend Symfony.
  9. You're reading from some old documentation. PHPMailer\PHPMailer\PHPMailer looks weird but it is correct: the first "PHPMailer" is the organization, the second is the project, and the third is the class itself. https://github.com/PHPMailer/PHPMailer/blob/master/UPGRADING.md
  10. If you don't like the default highlighting, have you looked into better highlighting?
  11. Don't use relative paths like anything that starts with ../ Use absolute paths. If fill_sidebar.php is in folder1 then write /xxx/folder1/fill_sidebar.php. If it's somewhere else then write /xxx/somewhere-else/fill_sidebar.php.
  12. If you have problems with some code then you have to post that code. Not the working code. The working code works. Working code doesn't help your non-working code.
  13. And what's the problem? I see some PHP code there which looks like it's on the right path. In fact it already has something to grayscale an image, so I would think that what you need to do is simply modify that to use black and white instead.
  14. Make sure PHP is being run with the correct locale, then retrieve it. Note that's not a complete answer. You'll need to investigate and test a little.
  15. The temp dir really ought to be writable by PHP. You and/or your client should complain to the "ISP" or whoever manages their PHP setup to allow for that. Worst case: write to someplace other than /tmp. Like a dedicated log directory for your application. Oh. And this is something that should be configurable.
  16. How about you try describing what you want with a few more words? Maybe even an example or two?
  17. Look at the documentation for session_destroy() to see how to destroy a session.
  18. Extensions are not freebies. Most of them come with particular requirements that you must have installed. So you tell me, does it make sense to install Oracle database support on your server if your application has nothing to do with it? And all that software comes with additional risks of vulnerabilities and such. And some of them do come with some overhead even when not in use. And every time you want to update an extension you have to restart PHP. Installing and enabling extensions is easy. Don't be lazy. Get what you need, don't get what you don't need.
  19. Given that Ubuntu Focal (20.04) uses PHP 7.4, installing it through apt will be easiest. That's the sort of thing you could probably have figured out yourself.
  20. And to be clear about potential confusion, the word "timestamp" has two meanings. The one I was using is a Unix timestamp, which is the number of seconds since January 1st 1970. So it's a number. The one gizmola is using is the TIMESTAMP type in the database, which converts easily between the numeric Unix timestamp and date strings.
  21. Then you would use the proc_* functions. They're complicated to understand and use (much more than this SSH thing I'm telling you about), but that is the best way to start up a process and send input to it (if you don't have any better alternatives).
  22. Yes, and I'm telling you that's not the right answer. The right answer is to set up a private key and modify your SSH configuration so the whole prompting problem completely goes away. Unfortunately if you search for stuff like "git ssh" you'll find a number of places that don't give the best answer. Generate your private key (that you can search for), associate it with the Git account, then follow this article on how to set it up with SSH. But like I said, make sure you do this for the correct user account on the machine. Which is probably not your personal account. When done right, you (and by "you" I mean whatever the correct user account was) can tell git to clone from github.com, or pull from it, or push to it, or whatever else, and the authentication will be completely handled for you. No prompts.
  23. There are a number of migration guides available to take you from 5.5 to 7.2. You should look through them for this upgrade process regardless of the encoding issue. Spoiler: you need to care about the default_charset at a minimum. The input/output/internal_encodings probably won't matter.
  24. Part of the way there. array_push could be useful except for one rather important limitation: you can't choose the array keys it uses. And since the keys are important here, array_push won't cut it. Also note that array_push is basically just a function version of the [] operator. As in array_push($array, $value) is the same as $array[] = $value. It does allow pushing multiple values at once, though, and sometimes that is useful.
  • 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.