hey i have these 2 pages
process.php
PHP Code:
<?php
$sport = $_POST['sports'];
$date = date("d/m/y");
$time = date("G:i:s");
$data_1 = "$sport $time $date";
setcookie("cookie",$data_1);
header("location: code.php");
?>
and code.php
PHP Code:
<form name="test" action="process.php" method="post" >
<input type="radio" name="sports" id="01" value="skate" onclick="document.test.submit();" /><label for="01">skateboard</label>
<input type="radio" name="sports" id="02" value="football" onclick="document.test.submit();" /><label for="02">football</label>
</form>
<?php
echo "<u>";
echo $_COOKIE['cookie'];
echo "<u />";
?>
so yeah when you click on one of the radio buttons you see
football 23:09:01 01/07/09
but i want a running text list showing the most recent buttons and times you clicked on it not just once. so it would be like
skate 23:53:35 01/07/09
skate 23:49:11 01/07/09
football 23:09:01 01/07/09
i've tryed using arrays but i cant get it to work so yeh wen a button is clicked it adds it to the running text list
any ideas?
process.php
PHP Code:
<?php
$sport = $_POST['sports'];
$date = date("d/m/y");
$time = date("G:i:s");
$data_1 = "$sport $time $date";
setcookie("cookie",$data_1);
header("location: code.php");
?>
and code.php
PHP Code:
<form name="test" action="process.php" method="post" >
<input type="radio" name="sports" id="01" value="skate" onclick="document.test.submit();" /><label for="01">skateboard</label>
<input type="radio" name="sports" id="02" value="football" onclick="document.test.submit();" /><label for="02">football</label>
</form>
<?php
echo "<u>";
echo $_COOKIE['cookie'];
echo "<u />";
?>
so yeah when you click on one of the radio buttons you see
football 23:09:01 01/07/09
but i want a running text list showing the most recent buttons and times you clicked on it not just once. so it would be like
skate 23:53:35 01/07/09
skate 23:49:11 01/07/09
football 23:09:01 01/07/09
i've tryed using arrays but i cant get it to work so yeh wen a button is clicked it adds it to the running text list
any ideas?