Bonjour
J'ai le problème suivant:
Quand je valide mon formulaire tinymce la page doAddContents.php me renvoit le message d'erreur suivant:
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /homez.714/reusites/www/doAddContents.php on line 8
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /homez.714/reusites/www/doAddContents.php on line 8
Quel est le problème? Je me débrouille très mal en php et là j'ai du mal à m'y retrouver...
Suis hébergé chez ovh...
Merci d'avance pour vos réponses!!
Modifié par philllou (27 May 2014 - 01:13)
      
      
    J'ai le problème suivant:
Quand je valide mon formulaire tinymce la page doAddContents.php me renvoit le message d'erreur suivant:
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /homez.714/reusites/www/doAddContents.php on line 8
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /homez.714/reusites/www/doAddContents.php on line 8
Quel est le problème? Je me débrouille très mal en php et là j'ai du mal à m'y retrouver...
Suis hébergé chez ovh...
Merci d'avance pour vos réponses!!
    <?php
    include("db.php");
    doDB();
     
    $h4_block = "Contents Saved!";
    $elm1 = $_POST['elm1'];
    $entity_elm1 = htmlentities($elm1);
    $entity_elm1 = mysql_real_escape_string($entity_elm1);
    $add_contents_sql = "UPDATE tinymce_contents SET `contents`=
    '$entity_elm1', `modified`=now()";
    $add_contents_res = mysqli_query($mysqli, $add_contents_sql)
    or die(mysqli_error($mysqli));
     
    //close connection to MySQL
    mysqli_close($mysqli);
     
    //create nice message for user
    $display_block = "<p>The page has been successfully updated.</p>";
     
    ?>
     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <body>
    <div>
    <h4><?php echo $h4_block; ?></h4>
    <?php echo $display_block; ?>
    <a href="view.php">View Page!</a>
    </div>
    </body>
    </html>
 Modifié par philllou (27 May 2014 - 01:13)