从特定页面重定向时添加类

Is it possible to add a class to a div on pageload, but ONLY when redirected from a specific link/page?

I have a <a href="marketing.php" id="openMyMaterialTab"><button class="secondaryAction">See all</button></a> link on my landingpage, that should add a class to a div on marketing.php on redirect. This class should not be active, when the page is loaded from other links.

Edited for clarification

Try to add this to your bootstrap page

session_start();
// page and classes 
$classes = array(
                    'page1.php' => 'class1',
                    'page2.php' => 'class2',
                    'index.php' => 'class3',
            );


$_SESSION['classes'] = $classes;

On each particular page

$predefined_classes = $_SESSION['classes'];
$class = "";

if( isset( $predefined_classes[ basename(__FILE__) ] ) ){

    $class = $predefined_classes[ basename(__FILE__) ];
}

use this $class now, like.

<button class="<?php echo $class; ?>"> </button>