Hey,
how can I use an if-else structure inside (or outside) a form to enable/disable a submit button? (I know the code below is wrong but I only want to describe my 'problem'.):

HTML Code:
<form action="text.php" method="get">
<label>Name: <input type="text" name="name" >
</label><br >
if ($active == "1")
    {<input type="submit" value="GO" >}
else
    {<input type="submit" value="GO" disabled ="disabled" >}
</form>