Ik krijg de volgende foutmelding van SQL, ik snap er geen hol meer van. Let niet op de scripting, het is redelijk nieuw voor mij, en dus waarschijnlijk ook niet netjes gescript.
selec.php
<?
include('dbconnect.php');
?>
<form name="invoeg" method="post" action="invoeg.php">
1*<select name="name" class="button">
<?php
$resultaat1 = mysql_query("SELECT name,id FROM movies") or die ("Er is iets mis met de database");
while($row = mysql_fetch_assoc($resultaat1))
{
echo '<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
?>
</select><br>
2*<select name="name" class="button">
<?php
$resultaat2 = mysql_query("SELECT name,id FROM movies") or die ("Er is iets mis met de database");
while($row = mysql_fetch_assoc($resultaat2))
{
echo '<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
?>
</select><br>
3*<select name="name" class="button">
<?php
$resultaat3 = mysql_query("SELECT name,id FROM movies") or die ("Er is iets mis met de database");
while($row = mysql_fetch_assoc($resultaat3))
{
echo '<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
?>
</select><br>
4*<select name="name" class="button">
<?php
$resultaat4 = mysql_query("SELECT name,id FROM movies") or die ("Er is iets mis met de database");
while($row = mysql_fetch_assoc($resultaat4))
{
echo '<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
?>
</select><br>
5*<select name="name" class="button">
<?php
$resultaat5 = mysql_query("SELECT name,id FROM movies") or die ("Er is iets mis met de database");
while($row = mysql_fetch_assoc($resultaat5))
{
echo '<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
?>
</select><br>
6*<select name="name" class="button">
<?php
$resultaat6 = mysql_query("SELECT name,id FROM movies") or die ("Er is iets mis met de database");
while($row = mysql_fetch_assoc($resultaat6))
{
echo '<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
?>
</select><br>
7*<select name="name" class="button">
<?php
$resultaat7 = mysql_query("SELECT name,id FROM movies") or die ("Er is iets mis met de database");
while($row = mysql_fetch_assoc($resultaat7))
{
echo '<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
?>
</select><br>
8*<select name="name" class="button">
<?php
$resultaat8 = mysql_query("SELECT name,id FROM movies") or die ("Er is iets mis met de database");
while($row = mysql_fetch_assoc($resultaat8))
{
echo '<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
?>
</select><br>
9*<select name="name" class="button">
<?php
$resultaat9 = mysql_query("SELECT name,id FROM movies") or die ("Er is iets mis met de database");
while($row = mysql_fetch_assoc($resultaat9))
{
echo '<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
?>
</select><br>
10<select name="name" class="button">
<?php
$resultaat10 = mysql_query("SELECT name,id FROM movies") or die ("Er is iets mis met de database");
while($row = mysql_fetch_assoc($resultaat10))
{
echo '<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
?>
</select><br>
<input type="submit" value=" Toevoegen " class="button">
</form>
<?
include('dbconnect.php');
?>
<?php
$query="INSERT INTO comingsoon (name,id) VALUES ('$resultaat1','$resultaat2','$resultaat3','$resultaat4','$resultaat5','$resultaat6','$resultaat7','$resultaat8','$resultaat9','$resultaat10')";
mysql_query($query) or die (mysql_error());
?>
<?
include('dbconnect.php');
?>
<?php
$query="INSERT INTO comingsoon (name,id) VALUES ('$resultaat1','$resultaat2','$resultaat3','$resultaat4','$resultaat5','$resultaat6','$resultaat7','$resultaat8','$resultaat9','$resultaat10')";