Revert "fixing fatal errors regarding get vars"

This reverts commit 84f94bcbbacbb2fcfdaf85bb3cba8212a751698e.
Revert "fixing fatal errors and redundant checks"

This reverts commit fe36e193b43d1b0df9f8b1f0235a11b0fa8897ea.
Revert "moving get and post requests to functions"

This reverts commit a729a07b4b456ae055cd470ae674af4e179180c4.