Hi there,
I have an index.php
that includes config.php
. Now I'm using $.get()
when I click a button to load a form:
$.get('form.php', function (form) {
$(form).insertAfter();
});
This form requires config.php
for some input values; however, when the form has loaded, I receive the php error:
Notice: Undefined variable: config in form.php on line 27
Line 27 of form.php
: if ($config['spam_protect']) {
I realize the config.php has already been instantiated when the page initially loads, thus I suspect this to be the problem I'm having. I've tried including config.php
within the form.php
file to no avail. Tips or tricks anyone?
Thanks!