$sql = "UPDATE weblog SET subject='$subject', body='$body' where id='$id'";
is this right?
Reason i'm asking is becuase i get no error yet, it doesn't update the db either.
looks right... example from w3schools
UPDATE Person SET Address = 'Stien 12', City = 'Stavanger' WHERE LastName = 'Rasmussen'
are you mysql_query()'ing the DB?
$sql = "UPDATE weblog SET subject='$subject', body='$body' where id='$id'"; mysql_query($sql); mysql_close();
that is my code.. Look ok?
echo "sql=$sql<br>\n";
and see what it outputs...
<?php $db = mysql_connect("localhost", "dbuser", "dbpass") or die ("Could not connect"); mysql_select_db("dbname") or die ("Could not select db"); $sql = "UPDATE `weblog` SET subject = '$subject', body = '$body' WHERE id = '$id'"; mysql_query($sql); ?>
tekky it outputs what it is suppose too..
try doing the or DIE method jonno posted
mysql_query ($sql) or die (mysql_error());