Ich hab mir das tut, dass du mir empfohlen hast, durchgelesen, ich habe den Aufbau geplant...ich habs eingegeben...und es hat funktioniert :D
frag mich bitte nicht WIE es funktioniert hat - ich brauch eigentlich nichteinmal das feld, weil ich nur $tp[0] in anspruch nehme....
hier mal der code:
if($anzahl == 0)
{
$tp = array(0);
$tp_als_string = serialize($tp);
echo '<input type = "hidden" name = "zzahl" value = "'.$zzahl.'">';
echo '<input type = "hidden" name = "meinarray" value = "'.$tp_als_string.'">';
}else{
if($anzahl == 1)
{
$tp = unserialize($_POST['meinarray']);
$tp[$_POST['anzahl']] = $_POST['zzahl'];
$tp_als_string = serialize($tp);
echo '<input type = "hidden" name = "zzahl" value = "'.$zzahl.'">';
echo '<input type = "hidden" name = "meinarray" value = "'.$tp_als_string.'">';
// print_r($tp);
echo "<br>Die vorherige Zufallszahl lautet: <b>$tp[0]</b>";
}
}
Am Anfang des php-files habe ich noch --->
$zzahl = $_POST['zzahl'];
hinzugefügt.
Einziger Haken: Der Zähler funktioniert nicht mehr, er bleibt auf 10 stehen. mhh....
Trotzdem danke vielmals!! :D