hass1980 Posted April 29, 2009 Share Posted April 29, 2009 Hi Im getting this error on my web page : Fatal error: Call to undefined function products() in C:\wamp\www\cart\admin\products.php on line 23 <?php // Include MySQL class require_once('../inc/mysql.class.php'); // Include database connection require_once('../inc/global.inc.php'); // Include functions require_once('inc/functions.inc.php'); // Include functions require_once('inc/product.inc.php'); // Start the session session_start(); if(!isset($_SESSION['AdminID'])) { return header("location: myaccount.php?action=login"); exit; } $array['products'] = 'selected'; siteHeader($array); echo products(); siteFooter(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/156144-fatal-error-call-to-undefined-function/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 29, 2009 Share Posted April 29, 2009 And what have you done to troubleshoot the problem? Have you checked if the function definition is actually in one of your required files? Checked for spelling errors? Quote Link to comment https://forums.phpfreaks.com/topic/156144-fatal-error-call-to-undefined-function/#findComment-821947 Share on other sites More sharing options...
Ken2k7 Posted April 29, 2009 Share Posted April 29, 2009 The last two require_once statements, is there a "inc" directory in the current directory, or in the parent like the first two? If the latter is the case, you need to put the "../" in front of the path. Quote Link to comment https://forums.phpfreaks.com/topic/156144-fatal-error-call-to-undefined-function/#findComment-821949 Share on other sites More sharing options...
hass1980 Posted April 29, 2009 Author Share Posted April 29, 2009 Still getting errors... not sure whats happening Quote Link to comment https://forums.phpfreaks.com/topic/156144-fatal-error-call-to-undefined-function/#findComment-821979 Share on other sites More sharing options...
wildteen88 Posted April 29, 2009 Share Posted April 29, 2009 Do you know where the function called products() is defined? I'm assuming you have this defined in products.inc.php or functions.inc.php. Can you confirm that this function is defined in either of those files? Quote Link to comment https://forums.phpfreaks.com/topic/156144-fatal-error-call-to-undefined-function/#findComment-821988 Share on other sites More sharing options...
hass1980 Posted April 29, 2009 Author Share Posted April 29, 2009 function products() is defined in product.inc.php Quote Link to comment https://forums.phpfreaks.com/topic/156144-fatal-error-call-to-undefined-function/#findComment-822025 Share on other sites More sharing options...
premiso Posted April 29, 2009 Share Posted April 29, 2009 function products() is defined in product.inc.php Are you sure about that. Because according to the error, it is not defined. I would verify that the product.inc.php is in the correct spot and has the code (meaning you were not editing a different file by accident). Quote Link to comment https://forums.phpfreaks.com/topic/156144-fatal-error-call-to-undefined-function/#findComment-822096 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.