r/PHP•
gotissues68

Refactoring a very old app

I work on an app once in awhile that was originally written in 2005 and I except updating the database connection method and jQuery version haven't updated much since 2008.

Reviewing the code, which I didn't originally write, is pretty ugly. I'm looking for suggestions on the best way to refactor this. I don't to mix php and html unless needed and I'll be separating out the javascript code. It'll still maintain the same functionality but clean things up and separate logic and concerns.

If this is the wrong subreddit please let me know.

Here's a pastebin of the code.

http://pastebin.com/Hz7QAEx2

Posted Feb 17, 2017, 3:27 AM UTC

117
Loading comments…