Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. Tyrsson

    Fun activity Say hello... in a coding language!

    <?php declare(strict_types=1); readonly class Hello { public function __construct(private string $name) {} public function greet(): string { return "Hello, {$this->name}!"; } } echo (new Hello('William'))->greet();
  2. Tyrsson

    Blocking access to dir and sub dir folders from public view

    Ideally the only php file(s) in the doc root will be your entry point files. All other executable files should be a directory above the doc root and htaccess should force all entry through the bootstrap file ie, index.php etc. Ideally the only directories and files that should live in the doc...
  3. Tyrsson

    PHP Do's and Don'ts

    For those new to php. You might want to take a day or two and read this: https://phptherightway.com/ Here's a short list of do's and don'ts Use composer, and its autoloader. Use a good DBAL for database access. Don't put your queries in the same files that contain your markup. Don't mutate...
  4. Tyrsson

    Haveing come to a complete stop in my code! (HTM, PHP & MySQL)

    Posting the code in question instead of just the error message would be a big help.
  5. Tyrsson

    Watup

    I'll keep it short. I go by Tyrsson, and have for nearly 20 yrs online. From B'ham Al. Got my start in code on the Simple Machines Forum team as support lead, customizer and dev. For the last 15 yrs I have contributed to various OSS software and led teams for various companies and freelanced...
  6. Tyrsson

    Read Me How did you find us?

    Found ya via Administrata.
  7. Tyrsson

    PHP Help Needed with "Notice: Trying to Access Array Offset on Value of Type Null" Error

    Update the condition to if (!empty($npcId) && !empty($npcs[$npcId])) { By the way, without any var_dumps in the file etc, what code is showing on line 53 in your file because in the file that you posted line 53 is: $data = json_decode(file_get_contents("php://input"), true); Edit to add: What...
  8. Tyrsson

    PHP What is your favorite PHP project?

    I would say that my favorite to date is the one I am currently working on. Freelancer Framework . It's a component library that will build on Mezzio micro framework to provide CMS level functionality but with the flexibility of a framework. It will have a robust cli suite for generating...
  9. Tyrsson

    PHP Problem with uploading an image to MySQL Database

    Hi, First let me state that I have not used PDO directly in a very long time so I am rusty. I'm also not sure if all of the relevant code is present but I have not seen where you have something similar to this (from your code above) for the query that is dying on you. As a general rule of...
Back
Top Bottom