web | link form

Web Design


Basic link form

<form method="POST" action="run.php">
<button class="pl" type="submit" name="mat" value="ana">Click here for analysis</button>
<button class="pl" type="submit" name="mat" value="alg">Click here for algebra</button>
</form>

--------------------------------------------

.pl {
     border:none; 
     background:none!important;
     padding:0!important;
     text-decoration: underline;
     cursor: pointer;
}

--------------------------------------------

<?php

$m = $_POST['mat'] ?? '';

if ($m=='ana'){echo 'I love analysis';}
elseif ($m=='alg'){echo 'I love algebra';}
else {echo 'Hello';}
?>