Page 1 of 1

Undefined function

PostPosted: 03. October 2006 21:47
by zodehala
in normal conditions following script must run

Code: Select all
<?php
$link = mysql_connect('localhost', 'admin', '123');
if (!$link) {
    die('keine Verbindung möglich: ' . mysql_error());
}

if (mysql_create_db("my_db")) {
    echo "Base de données créée\n";
} else {
    echo "Erreur lors de la création de la base: " . mysql_error();
}
?>


but whenever i try to run this script following error is occured


Fatal error: Call to undefined function mysql_create_db() in C:\Program Files\xampp\htdocs\mysite\index.php on line 7

my server
========================================
* Apache 2.2.3
* MySQL 5.0.24a
* PHP 5.1.6 & PHP 4.4.4
* phpMyAdmin 2.8.2.4
* FileZilla FTP Server 0.9.18
* OpenSSL 0.9.8c


where is the problem ????????????????

PostPosted: 04. October 2006 00:13
by Wiedmann
where is the problem ????????????????

You have not read the PHP-Manual!!!!!!!!!!!!!!!!

BTW:
The error message is clear... There is no function mysql_create_db() in PHP (with an up-to-date MySQL client).