Fatal Error: call to undefined function db_query()

  • warning: include() [function.include]: Unable to access /home/drupal_in/drupal.in/themes/engines//includes.php in /home/cityseh0/public_html/drupal.in/themes/garland/page.tpl.php on line 66.
  • warning: include(/home/drupal_in/drupal.in/themes/engines//includes.php) [function.include]: failed to open stream: Success in /home/cityseh0/public_html/drupal.in/themes/garland/page.tpl.php on line 66.
  • warning: include() [function.include]: Unable to access /home/drupal_in/drupal.in/themes/engines//includes.php in /home/cityseh0/public_html/drupal.in/themes/garland/page.tpl.php on line 66.
  • warning: include(/home/drupal_in/drupal.in/themes/engines//includes.php) [function.include]: failed to open stream: Success in /home/cityseh0/public_html/drupal.in/themes/garland/page.tpl.php on line 66.
  • warning: include() [function.include]: Failed opening '/home/drupal_in/drupal.in/themes/engines//includes.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cityseh0/public_html/drupal.in/themes/garland/page.tpl.php on line 66.
kuldeep's picture

hi,

i am trying o call a php file through ajax using following code inside a page in my themes directory:

$(document).ready(function(){
$("#selectionresult").hide();

$("#country").change( function() {
$("#selectionresult").hide();
$("#result").html('Retrieving ...');
$.ajax({
type: "POST",
data: "data=" + $(this).val(),
url: "<?php echo path_to_theme(); ?>/get_states.php",
success: function(msg){
if (msg != ''){
$("#selectionresult").html(msg).show();
$("#result").html('');
}
else{
$("#result").html('No item result');
}
}
});
});
});

The get_states.php file makes use of db_query and other drupal functions. but i keep getting Fatal Error: call to undefined function db_query() error,plz suggest me a way to resolve this issue.

Thanks,
Kul.

clark40's picture

I have installed drupal java

I have installed drupal java certification dumps and i upload a theme i.e., conch in that i want to change the slider area I want to place a Image with text in that place how can rhct study guide i change that area by default it was showing a black screen in that a small thumbnail drupal image is there please any one can help me enables parents to stay connected with their child’s academic life & windows 7 certification the educational institution and makes the educational institutions more efficient with their day to day operations by automating all the important process. The suite enables building a strong educational collaborative community by connecting various people within the institute, across educational institutions testking security+ which are part of the EM network and the industry to exchange ideas and share knowledge across a spectrum of topics.

khalidahmed_sk's picture

Hi, try to add these lines in

Hi,

try to add these lines in your get_states.php file

include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);

and i think the get_states.php file should reside in your root directory.

Regards
Khalid Ahmed
GSR Tech