Skip to main content
13 events
when toggle format what by license comment
Feb 4, 2014 at 13:32 comment added rgerculy Ok, will use file_put_contents log errors into text file. That should be enough.
Feb 4, 2014 at 13:07 comment added James @rgerculy no it is not good echo the error onto the page. You should create a logger class and log PDOException to file. That way if you are running into any issue you can view the log to troubleshoot.
Feb 4, 2014 at 13:04 comment added rgerculy One question , this safe to use on live project ? : catch (PDOException $ex) { echo "An Error occured!" . $ex; }
Feb 4, 2014 at 12:41 history edited Bobby CC BY-SA 3.0
Fixed formatting.
Feb 4, 2014 at 1:29 history edited James CC BY-SA 3.0
Fixed misspelling inside of the code.
Feb 3, 2014 at 23:44 history edited James CC BY-SA 3.0
Provide an example and explained design pattern.
Feb 3, 2014 at 19:58 comment added rgerculy I made some research and found this : stackoverflow.com/questions/3200155/… . Is that what I should use ? If so for me would be : pastebin.com/y892My4A .... ?
Feb 3, 2014 at 16:10 comment added James @rgerculy OOP can be difficult. I will post an example once i get off.
Feb 3, 2014 at 15:17 comment added rgerculy Oke, since yesterday I was looking for a solution regarding to DRY, however I can't find the right path. I tried this but didn't work ( Don't blame me, still try to learn this new stuff ) pastebin.com/XRf5pV99
Feb 2, 2014 at 13:21 comment added James If you make your code modular (each function does one thing only/ DRY - Don't repeat your self), you can reuse that function later on. For example, your current implementation you check if the email exist and insert your new user inside the same RegisterN function. Why not break that code block up into two different function so you can later reuse. It makes it easier to make changes and update your code in the future.
Feb 2, 2014 at 13:03 comment added rgerculy Password check was added and tested. Thank you. About the other 3 recommendations I'm a little lost.. but I'll try to apply them asap.
Feb 2, 2014 at 13:01 vote accept rgerculy
Feb 2, 2014 at 12:53 history answered James CC BY-SA 3.0