Дава ми следната грешка
Notice: Undefined variable: poracki in C:\xampp\htdocs\.......\modeli.php on line 28
Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in C:\xampp\htdocs\........\modeli.php on line 28
както се вижда променливата $poracki е там, но не знам защо ми изписва, че не е там
ето кода - последният ред е 28-ми ред
Notice: Undefined variable: poracki in C:\xampp\htdocs\.......\modeli.php on line 28
Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in C:\xampp\htdocs\........\modeli.php on line 28
както се вижда променливата $poracki е там, но не знам защо ми изписва, че не е там
ето кода - последният ред е 28-ми ред
Код:
$user="root";
$pass="......";
$database=".......";
$server="localhost";
$poracki = mysqli_connect($server, $user, $pass, $database);
if (!$poracki) {
die('Connect Error (' . mysqli_connect_errno() . ') '
. mysqli_connect_error());
}
echo 'Success... ' . mysqli_get_host_info($poracki) . "\n";
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysqli_real_escape_string") ? mysqli_real_escape_string($poracki, $theValue) : mysqli_escape_string($theValue);