How can the issue of default CSS loading after clicking a link be resolved without using sessions in PHP?

Issue: The problem of default CSS loading after clicking a link can be resolved by passing a parameter in the URL when clicking the link and using that parameter to determine which CSS file to load. This can be achieved without using sessions in PHP.

<?php
// Check if a specific CSS file is requested
if(isset($_GET['css'])) {
    $css = $_GET['css'];
} else {
    $css = 'default.css'; // Default CSS file
}
?>

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="<?php echo $css; ?>">
</head>
<body>
    <a href="page.php?css=custom.css">Load Custom CSS</a>
</body>
</html>