Bonjour,

je suis entrain de faire mon site en php (je suis débutante)
sur une des pages de mon site je voulais placer du texte à partir de ma base de donnée, j'ai donc créer une table ou j'ai mis mon texte, jusque là tout vas bien et je l'ai inséré dans ma page html (je travail avec dreamweaver)
voici mon code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
mysql_select_db($database_artobaz01, $artobaz01);
mysql_query ("SET NAMES UTF8");
$query_text_graphisme = "SELECT titre, texte FROM text_graphisme";
$text_graphisme = mysql_query($query_text_graphisme, $artobaz01) or die(mysql_error());
$row_text_graphisme = mysql_fetch_assoc($text_graphisme);
$totalRows_text_graphisme = mysql_num_rows($text_graphisme);
?>

le problème c'est que quand je publie ma page, il n'y a plus rien (graphisme..etc)
juste ce message d'erreur apparait :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /homepages/5/d430950995/htdocs/graphisme.php on line 32
 
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2) in /homepages/5/d430950995/htdocs/graphisme.php on line 33
 
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /homepages/5/d430950995/htdocs/graphisme.php on line 33
 
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /homepages/5/d430950995/htdocs/graphisme.php on line 35
Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)
Voilà ça fait trois heures que je suis dessus et je n'arrive pas à résoudre le problème.

Je me tourne donc vers tout les pros du PHP en espèrant qu'une âme charitable saura m'aider.
Merci d'avance.