I’m looking for a way to combine my PHP code into my Python file. Maybe strange, but for me it would be quite helpfull. I simply want this part of PHP-code in Python because I don’t know how to rewrite it in Python :(
function counter_winkelkar()
{
global $order;
global $refname;
if(isset( $_POST['clearknop'] ))
{
$_SESSION['count']= '0';
unset($_SESSION['array_products']);
unset($_SESSION['array_counting_products']);
}
if (isset( $_POST['refname'] ))
{
$_SESSION['count']= $_SESSION['count'] + $order;
print("$_SESSION[count]");
}
}
function products_winkelkar()
{
global $order;
global $db;
global $refname;
if (!isset($_SESSION['array_products']) )
{
$_SESSION['array_products'] = Array();
$_SESSION['array_counting_products'] = Array();
}
if ($order != 'number' )
{
array_push($_SESSION['array_products'],$refname);
array_push($_SESSION['array_counting_products'],$order);
}
}
function winkelkar()
{
counter_winkelkar();
products_winkelkar();
}
winkelkar();
?>