Witam.
Czy jest możliwe, aby po wykonaniu submita formularza, dane które są w nim zapisane zostały ? Chodzi o to aby nie był on resetowany.
<?php ?>
W formularzu dalej tkwią te dane.
<?php $_POST[\"d1\"]=''; $_POST[\"d2\"]=''; ?>
<html> <body> <form name="form1" action="form.php" method="post"> <?php print 'dane1:<input type="text" name="d1" value="'.$_POST['d1'].'">'; print 'dane2:<input type="text" name="d2" value="'.$_POST['d2'].'">'; ?> <input name="s2" type="submit" value="previev"> </form> <?php if(isset($_POST["s1"])){ $_POST["d1"]=''; $_POST["d2"]=''; echo "Dodawanie"; }else if(isset($_POST["s2"])){ echo "Podejrzenie"; } else{ echo "Nic"; } ?> </body> </html>
<?php { $d1=\"\"; $d2=\"\"; } { $d1=$_POST['d1']; $d2=$_POST['d2']; } ?> <html> <head> <title></title> </head> <body> <form name=\"form1\" action=\"form.php\" method=\"post\"> <?php dane1: <input name=d1 type=text value=$d1><br> dane2: <input name=d2 type=text value=$d2><br> \"); ?> opis <textarea name=\"ar1\" rows=\"5\" cols=\"80\" value=\"\"></textarea> <input name=\"s1\" type=\"submit\" value=\"add\"><br> <input name=\"s2\" type=\"submit\" value=\"previev\"> </form> </body> </html>