Hi all,
I've added a form to my Zen shop and used jQuery to call a php script to validate the form when the submit button is pressed.
I had to put this php script in a new folder at the root of my website. I tried it in my templates folder at first but it wouldn't work for some reason?

The problem is, I can't use any of the standard Zen Cart functions from my script. Presumably because it is at the root or my website?

Is there any way I can use the Zen Cart functions, such as zen_validate_email from my script?

I've tried adding the following to the top of the script because I've seen other jQuery scripts do the same:
Code:
require('includes/configure.php');
require_once('includes/application_top.php');
But just those 2 requires cause the script to fail.

I'm really grabbing at straws as you can see!
I've been trying to write this for ages now but am getting nowhere.
Can anyone spot what I'm doing wrong?

Thank you!