UPDATE
change.php----------
<?php
$db = mysql_connect("localhost", "Movies");
mysql_select_db("Movies",$db);
$result = mysql_query("SELECT id, title, size, discs, format, resolution, subtitles, sublan FROM MovieList ORDER by title") OR DIE(mysql_error());
while($row = mysql_fetch_array($result)) {
extract($row);
?>
<form method="post" action="changemovie.php">
<input type="text" name="id" size="3" value="<?php echo $id ?>">
<input type="text" name="title" size="40" value="<?php echo $title ?>">
<input type="text" name="size" size="5" value="<?php echo $size ?>">
<input type="text" name="discs" size="5" value="<?php echo $discs ?>">
<input type="text" name="format" size="5" value="<?php echo $format ?>">
<input type="text" name="resolution" size="10" value="<?php echo $resolution ?>">
<input type="text" name="subtitles" size="5" value="<?php echo $subtitles ?>">
<input type="text" name="sublan" size="25" value="<?php echo $sublan ?>">
<input type="submit" name="ok" value="Change">
</FORM>
<?php
}
?>
changemovie.php
---------------
<?php
extract($_POST);
$db = mysql_connect("localhost", "Movies");
mysql_select_db("Movies",$db);
$SQL = "UPDATE Movielist SET Title = '$title', Size = '$size', Discs = '$discs' Format = '$format' Resolution = '$resolution' Subtitles = '$subtitles' Sublan = '$sublan' WHERE ID = '$id'";
mysql_query($SQL) or die(mysql_error());
echo "Database Updated";
mysql_close();
?>
-----
Jeg får denne fejl:
You have an error in your SQL syntax near 'Format = 'format' Resolution = 'resolut' Subtitles = 'No' Sublan = 'Languages' W' at line 1
Nogen der kan gennemskue hvor fejlen ligger?