hi,
i have to make a school project for school and i have to make a poll system where you can choose between 50 bands.
but i dont know how,
the task is that i have a first vote then that vote gets 10 points then you click on send then the site comes back for the second vote for 6 points and the same for the 3rd vote for 3 points.
this is what i have so far
<?php include 'database.php';?>
<body>
<fieldset>
<legend>What is your favorite Band?</legend>
<form action="" id="form1" name="form1" method="POST">
Email:<br>
<input type="text" name="Email" id="Email"></br></br>
Keuze 1:<br/>
<?php echo '<select name="vote">';
echo '<option>Kies een band</option>';
$sql="SELECT * FROM bands ORDER BY band";
$result = mysqli_query($db_link, $sql);
if (!$result){
die ("Database connection failed!");
}
while($row = mysqli_fetch_assoc($result)){
echo '<option value="' . $row['band_id'] . '">' . $row['band'] . '</option>';
}
echo '</select>';
?> <br/>
<?php
// keuze 1
/*$teller = 1;
while($teller <4) {
} */
// email opslaan
if (isset($_POST['submit'])){
$email = mysqli_real_escape_string($db_link, $_POST['Email']);
$stmt2 = mysqli_prepare($db_link, "INSERT INTO stemmers (stem_id, email) VALUES (NULL, ?)");
mysqli_stmt_bind_param($stmt2, "s", $email);
mysqli_stmt_execute($stmt2);
}
?>
<input type="submit" name="submit" id="submit" value="Vote" />
</form>
</fieldset>
</body>