Untitled

mail@pastecode.io avatar
unknown
php
2 years ago
346 B
1
Indexable
Never
<?php
$n=$_GET['n'];
if($n > 10)
{
  $class="green";
}
else
{
    $class="red";
}
?>

<html>
<head>
<style type="text/css">
.box{
    width: 100px;
    height: 100px;
}
.green
{
    background: #0f0;
}
.red
{
    background: #f00;
}
</style>
</head>
<body>
<div class="box  <?= $class ?> ">
</div>
</body>
</html>