Jump to content

Moorcam

Members
  • Posts

    280
  • Joined

  • Last visited

  • Days Won

    1

Moorcam last won the day on January 8

Moorcam had the most liked content!

1 Follower

About Moorcam

  • Birthday 02/12/1971

Contact Methods

  • Website URL
    https://www.moorcam.com.au

Profile Information

  • Gender
    Male
  • Location
    Victoria, Australia
  • Interests
    Coding, driving large heavy vehicles.
  • Age
    54

Recent Profile Visitors

5,666 profile views

Moorcam's Achievements

Advanced Member

Advanced Member (4/5)

7

Reputation

14

Community Answers

  1. So, are we to guess what you have done so far? Or, will you enlighten us by providing us with what you have done so far?
  2. To remove the X-PHP headers from your email, you can use the ini_set() function to disable the addition of these headers before sending your email.
  3. You are opening the file using the localhost URL, right? Not right-clicking on the file and selecting open in Chrome or whatever?
  4. Try some proper error handling to get more insight: if ($results === false) { // Handle the error echo "Error executing query: " . mysqli_error($con); } else { while ($line = mysqli_fetch_assoc($results)) { // Process each line of results // Example: echo $line['event']; } }
  5. There could be many reasons for this to happen. It sounds to me like server processing time or network latency. You could try implementing a debounce function to limit the number of requests sent to the server when the user hovers over the button multiple times in quick succession.
  6. You need to make sure that the session is started correctly and that the session ID is set before any output is sent to the browser.
  7. Why do Java developers wear glasses? Because they don’t C#!
  8. Welcome Jerry!
  9. Place your code insode code blocks. Like so... Code here...
  10. You need to ensure that $fdw is initialized properly before it is used. $fdw is expected to hold a date string, but if it is not initialized before the form is submitted, the DateTime constructor will throw an error. What does your error logs say?
  11. Just a thought here. Are the teachers and supervisors saved as an Array in the database? If they are, this could be the issue because PHP has issues displaying data to a certain user based on ID or username or whatever because it also retrieves the data from the database including the [""], for example, ["teacher"], ["supervisor"]. Just a thought.
  12. You will be best contacting your hosting provider as it could be a combination of different things. But as was stated, the error is indicating that the username or password or both are wrong. It could also be a privilege issue or a misconfigured PhpMyAdmin.
  13. Let’s settle a debate that’s been raging (in my head, at least) for years: What’s the best PHP IDE or framework? Personally, I’ve hopped around like a caffeinated squirrel trying to find "the one." VS Code is my current IDE of choice because extensions are basically cheat codes for lazy developers like me. But I still have a soft spot for PHPStorm—despite it being the IDE equivalent of a luxury car. Sure, it’s fast and powerful, but does it have to cost as much as my coffee addiction? As for frameworks, I’ve dabbled with Laravel, Symfony, and CodeIgniter. Laravel feels like PHP on training wheels—smooth, elegant, and ready to do the heavy lifting. Symfony, on the other hand, is like the DIY kit of frameworks: powerful but occasionally makes you question your life choices. And CodeIgniter? It’s the scrappy underdog that still gets the job done when you just need something lightweight. However, I still love it raw like my steaks! (not really). So, here’s what I want to know from you: IDE or Editor: Do you swear by VS Code, dream in PHPStorm, or bravely code in Notepad++? Framework: Are you a Laravel evangelist, a Symfony purist, or a CodeIgniter minimalist? Or are you a rebel coding in plain PHP and laughing in the face of frameworks? Bonus points for any funny stories—like the time you spent 2 hours debugging only to find out you forgot a semicolon (we’ve all been there. Like me just today). Let’s hear it! Enlighten me, entertain me, and most importantly, help me justify my next subscription or Lucozade binge. Cheers! Dan
  14. Hi, I am Dan. I’ve been designing web applications—on and off—since 2001, back when animated GIFs were all the rage and ‘responsive design’ meant answering your client’s emails. Over the past 14 years, I’ve tried to keep pace with the ever-evolving trends in web development, successfully delivering a variety of projects that made my clients happy (and kept me caffeinated). I specialize in PHP development, including experience with MySQLi and PDO for database integration, and I’m well-versed in JavaScript (both vanilla and frameworks like jQuery), Python, and more. Whether it’s building efficient back-end systems, creating dynamic front-end experiences, or troubleshooting complex issues, I’m always up for a challenge. Need custom work done? Pop me an email—let’s make something awesome together! [email protected] My website: www.danoriordan.com
  15. That's ok. We all learn as we go along As Barand said above, the syntax you need is in the foreach loop. Try this. Replace your function list_holidays with this: function list_holidays(DateTimeInterface $date): bool { $year = (int) $date->format('Y'); foreach (get_holidays($year) as $holiday_name => $holiday_date) { $holiday_formatted = $holiday_date->format('Y-m-d'); echo "$holiday_name is $holiday_formatted\n"; } return true; // Added return statement for consistency } Look at the code above, get familiar with what it does. That's how you learn. We are now using the foreach loop to retrieve the holiday name and holiday date. This should now output in the way you want. See how it goes Doing a quick Google (we all know Dr. Google knows everything, right?) It explains what a foreach loop is:
×
×
  • 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.