I am creating a survey based on a PHP script. The script re-loads itself with a different set of videos to be rated and a set of radio buttons to choose from after clicking a "submit" button.
I have the problem that my scores are not being saved in the Session variable. When I print it, it is empty.
Here is an excerpt of my code:
<?php
session_start();
if (isset($_POST['submit2'])) {
$_SESSION['rating2'] = $_POST['score2'];
}
?>
<table>
<tr>
<td>
<?PHP echo "<embed src='$video1' width='400' height='400'>"; ?>
<br/><br/>
<input type="radio" name="score2" value="A"> <?php echo "A"; ?>
</td>
<td>
<?PHP echo "<embed src='$video2' width='400' height='400'>"; ?>
<br/><br/>
<input type="radio" name="score2" value="B"> <?php echo "B"; ?>
</td>
</tr>
</table>
<form action="setup2.php?video=<?php echo $nextvideo; ?>" method="post">
<input type="submit" name="submit2" value="Submit">
Apologies if that looks messy, I'm very new to PHP and hope that someone can point me into the right direction. Thanks!