www/includes/db_recipes.php

changeset 77
a9f8de2d7b2b
parent 72
93a0be4f5be3
child 80
75b9227fb98c
equal deleted inserted replaced
76:804d45bdaa86 77:a9f8de2d7b2b
6 #Connect to the database 6 #Connect to the database
7 $connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME); 7 $connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME);
8 if (! $connect) { 8 if (! $connect) {
9 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); 9 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error());
10 } 10 }
11 mysqli_set_charset($connect, "utf8" );
11 12
12 $escapers = array("\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c"); 13 $escapers = array("\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c");
13 $replacements = array("\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b"); 14 $replacements = array("\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b");
14 $rescapers = array("'"); 15 $rescapers = array("'");
15 $rreplacements = array("\\'"); 16 $rreplacements = array("\\'");

mercurial