get_super_global(\phpbb\request\request_interface::POST) as $key => $value) { $postVars .= $value; } } /*if($_SERVER['REMOTE_ADDR'] != '216.41.56.90') { if($request->variable('REMOTE_ADDR', '') != '216.41.56.90') { if(preg_match("/MIME-Version:/i",$postVars) || preg_match("/Content-Type:/i",$postVars)) die('Not Valid Data'); } }*/ $dbhost = 'localhost'; $dbuser = 'vrw_dbuser'; $dbpass = 'gansett'; global $conn; $conn = mysqli_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'vrw_reviews'; mysqli_select_db($conn, $dbname); function getProduct($id, $conn){ $sql = "SELECT * FROM `product` WHERE `id` LIKE '".mysqli_real_escape_string($conn, $id)."' LIMIT 1"; $query = mysqli_query($conn,"$sql") or die("Error:" . mysqli_error()); $rows = $query->fetch_assoc(); return $rows; } function getProductName($name, $conn){ $sql = "SELECT * FROM `product` WHERE `productName` LIKE '".mysqli_real_escape_string($conn, $name)."' LIMIT 1"; $query = mysqli_query($conn,"$sql") or die("Error:" . mysqli_error()); $rows = $query->fetch_assoc(); return $rows; } function alphanumeric($string) { $new_string = preg_replace("/[^a-zA-Z0-9]/", "", $string); return $new_string; } function state_dropdown($selected = "", $name = "state") { $states = array('AL'=>'ALABAMA','AK'=>'ALASKA','AZ'=>'ARIZONA','AR'=>'ARKANSAS','CA'=>'CALIFORNIA','CO'=>'COLORADO','CT'=>'CONNECTICUT','DE'=>'DELAWARE','DC'=>'DISTRICT OF COLUMBIA','FL'=>'FLORIDA','GA'=>'GEORGIA','HA'=>'HAWAII','ID'=>'IDAHO','IL'=>'ILLINOIS','IN'=>'INDIANA','IA'=>'IOWA','KS'=>'KANSAS','KY'=>'KENTUCKY','LA'=>'LOUISIANA','ME'=>'MAINE','MD'=>'MARYLAND','MA'=>'MASSACHUSETTS','MI'=>'MICHIGAN','MN'=>'MINNESOTA','MS'=>'MISSISSIPPI','MO'=>'MISSOURI','MT'=>'MONTANA','NE'=>'NEBRASKA','NV'=>'NEVADA','NH'=>'NEW HAMPSHIRE', 'NJ'=>'NEW JERSEY','NM'=>'NEW MEXICO','NY'=>'NEW YORK','NC'=>'NORTH CAROLINA','ND'=>'NORTH DAKOTA','OH'=>'OHIO','OK'=>'OKLAHOMA','OR'=>'OREGON','PA'=>'PENNSYLVANIA','RI'=>'RHODE ISLAND','SC'=>'SOUTH CAROLINA','SD'=>'SOUTH DAKOTA','TN'=>'TENNESSEE','TX'=>'TEXAS','UT'=>'UTAH','VT'=>'VERMONT','VA'=>'VIRGINIA','WA'=>'WASHINGTON','WV'=>'WEST VIRGINIA','WI'=>'WISCONSIN','WY'=>'WYOMING'); $html = ""; return $html; } function SChecked($field,$val,$def=false) { if(isset($_REQUEST[$field]) && $_REQUEST[$field] == $val) { return " checked "; } elseif(!isset($_REQUEST[$field]) && $def == true) { return " checked"; } } function in_multi_array($needle, $haystack) { $in_multi_array = false; if(in_array($needle, $haystack)) { $in_multi_array = true; } else { foreach($haystack as $key => $val) { if(is_array($val)) { if(in_multi_array($needle, $val)) { $in_multi_array = true; break; } } } } return $in_multi_array; } function reviewUrlUnEncode($input) { $input = str_replace("-", " ", $input); $input = str_replace("_", "-", $input); return $input; } function reviewUrlEncode($input) { $input = strtolower(str_replace("-", "_", $input)); $input = strtolower(str_replace(" ", "-", $input)); return $input; } ?>
Notice: Undefined variable: conn in /var/www/vhosts/vinyl-replacement-windows.com/httpdocs/reviews/index.php on line 4

Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /var/www/vhosts/vinyl-replacement-windows.com/httpdocs/reviews/index.php on line 10

Fatal error: Call to a member function fetch_assoc() on null in /var/www/vhosts/vinyl-replacement-windows.com/httpdocs/reviews/index.php on line 13