>>1310129>I dont use js at all, the filename was from some random tutorial I was just readin>I've fixed this issue with session variables that check where the user is coming from. Is this dumb?>if($_SESSION["page"] == "categories") {>$requirepath = "../../dbfiles/db.php";>}>else if($_SESSION["page"] == "login") {>$requirepath = "../dbfiles/db.php";>}No. Smart. And depending wtf u want, u can use the path module built into Node.js to dynamically generate the appropriate path for the required file without having to create multiple session variables. Also, if ur working with an MVC architecture, u can use the Controller and Model parts to manage the database connections, 100% eliminating the need for the require path.