A way to log error php messages?

2 replies
hey so i have a few error messages that will appear on my register page.. one is "you can only have one account" and i want to record every time it pops up.. in a log file, and if its even possible it to auto ban the other account detected. it would simply do this with an update mysql function. any one know how this could be done?
#error #log #messages #php
  • Profile picture of the author KirkMcD
    Well, in the part of the script that writes the error message to the screen, have it also write it to a file.
    Then if that specific message occurs have it update your database to ban the other accounts.
    {{ DiscussionBoard.errors[5755619].message }}
  • Profile picture of the author zon3d
    That all depends on how your accounts DB is set up. But it is all a matter of find the account id of the other account and then simply doing a DELETE or UPDATE SQL command on that account id to mark it as disabled.
    {{ DiscussionBoard.errors[5757691].message }}

Trending Topics