Tout d'abord bonjour à tous,
j'ai installé Flash page flip pro-php afin de realiser un petit livret, mais lorsque je le lance j'ai ce message d'erreur qui apparait :
Notice: Undefined variable: conn in D:\Program Files\EasyPHP 3.0\www\Pro-Php Version\db.php on line 20
Je vous donne egalement le fichier db.php :
<?php
require_once("config.php");
class db_layer
{
private $conn;
function __construct()
{
}
public function getConnection()
{
if($this->conn == "")
{
$conn = mysql_connect("localhost","root","****l") or die('Problème de connection à mysql');
mysql_select_db("coursphp",$conn);
mysql_query("SET NAMES 'utf8' COLLATE 'utf8_unicode_ci';");
$this->conn = $conn;
}
return($conn);
}
public function execute_sql($arg_sql,&$arg_result,&$arg_error_msg)
{
$arg_sql = str_replace(';', ':', $arg_sql);
$this->getConnection();
if (!($arg_result = mysql_query($arg_sql)))
{
$arg_error_msg = "There was a problem With the Database".NL."Error : ".mysql_error().NL.NL;
$arg_error_msg .= "SQL = [".$arg_sql."]";
echo $arg_sql1= $arg_sql." ### ".mysql_error();
return FALSE;
}
else
{
return TRUE;
}
}
}
?>
Si quelqu'un pouvez m'aider svp, merci et bon week end.
Configuration: Windows XP
Firefox 3.0.5