add to cart - undefined function get_magic_quotes_gpc()
Hi. Just created a new cart and am trying to add an add to cart behaviour on a page. The page isn't re-directing correctly, despite having this code directly above the DOCTYPE:
<?php
// WA eCart Redirect
if ($NJeCart->redirStr != "") {
if (function_exists("rel2abs")) $NJeCart->redirStr = rel2abs($NJeCart->redirStr,dirname(__FILE__));
header("Location: ".$NJeCart->redirStr);
die();
}
?>
..and is also producing the error:
Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in C:\inetpub\wwwroot\NJ-MASTERSITE\WA_eCart\NJeCart_PHP.php:26 Stack trace: #0 C:\inetpub\wwwroot\NJ-MASTERSITE\shop.php(55): NJeCart_Definition->AddToCart() #1 {main} thrown in C:\inetpub\wwwroot\NJ-MASTERSITE\WA_eCart\NJeCart_PHP.php on line 26
Reading through some other support posts, it appears that the get_magic_quotes function is DEPRECATED as of PHP 7.4.
How do I resolve this?
Thank you.
NJ