Posted by:
thudson
(---.dynamic.dsl.as9105.com)
Hi
I have just recently installed WAMP server on my laptop, after successfully running Apache, PHP and MySQL on my desktop. These I installed separately as I did not know about WAMP then.
I get an error on the WAMP installation [Call to undefined function doDB() in.......].
Here is the fuction in my store_connect.php script:
<?
//set up a couple of functions for use by eStore
function doDB() {
global $mysqli;
//connect to server and select database; you may need it
$mysqli = mysqli_connect("localhost", "root", "xxxxxx", "store"
;
//if connection fails, stop script execution
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
}
?>
This script is called from several scripts with the following lines:
include("store_connect.php"
;
doDB();
Rocky48