6

Just before deploying this to prod found this bug... discover this bug with bunch of print statements

Comments
  • 1
    Hard coded credentials 😱
    Not in a function / class 😳
    Root access 😡😡😡😡😡😡😡😡
  • 1
    @C0D4 I'm still learning... I know the importance of all these... It's still on local host so don't worry about root access
  • 1
    Full project at GitHub.com/dextel2/Admission
  • 1
    @dextel2
    Ok starting out, I can be more lenient.
    Put the credentials into a config / definitions file.
    So you can reuse them.

    Shove the mysqli connector into a class or atleast a function you can reuse.
    Plenty of mysqli wrappers out there in the wild, not all great.

    And as it’s local I can accept root, but if that ever moves make a new user with restricted permissions.

    Also use fetch_assoc not array. It will make your life a billion times easier to debug things later.
  • 1
    I found your bug!
    It's right there on line 1 😉
  • 0
    @Ashkin session_start()?
  • 1
    @dextel2 <?php 😉😋
Add Comment