Variable i ny PHP
Nedenstående er fra opret1.php - hvorfor kan jeg ikke få fat i mine variable?<? print ("$action");
$dato = "";
$dato = $_REQUEST['dato'];
if ($dato == "") {
echo("Fejl - intet indhold");
} else {
echo($dato);
}
?>
<a href="index.php">Startside</a><br />
<form method="post" name="opret" action="opret1.php?action=opret">
<table>
<tr><td>Dato</td><td><input type="text" name="dato" maxlength="8" value="<? print(date('j-m-y')); ?>"></td></tr>
<tr><td>Klientnr</td><td><input type="text" id="klientnr" maxlength="3"></td></tr>
<tr><td>Klientnavn</td><td><input type="text" id="klientnavn" maxlength="30"></td></tr>
<tr><td>Starttid</td><td><input type="text" id="start" maxlength="5" value="<? print(date('H:i')); ?>"></td></tr>
<tr><td>Emne</td><td><input type="text" id="emne" maxlength="150"></td></tr>
<tr><td>Tekst</td><td><textarea id="tekst" cols="60" rows="10"></textarea></td></tr>
<tr><td>Sluttid</td><td><input type="text" id="slut" maxlength="5"></td></tr>
<tr><td>Periode</td><td><input type="text" id="periode" maxlength="30"></td></tr>
<tr><td>Tidsforbrug (min)</td><td><input type="text" id="tidsforbrug"></td></tr>
<tr><td>Initialer</td><td><input type="text" id="initialer" maxlenght="5"></td></tr>
<tr><td>Afsluttet</td><td><input type="checkbox" id="afsluttet"></td></tr>
<tr><td></td><td><input type="submit" id="subbtn" value="Opret"></td></tr>
</table>
</form>