ok, it still not works
here the code from the form, which submits the data (successfully, I added echos to the "update" script, the data can be displayed on the page, also the id is working, but the data is not updated.
in the table If have one mcore colulm called "picture_name" which should NOT be changed, so It is not inclduded in the form and the validate script...but can this cause the problem?
you can have a look and test it at www.xsibase.com/e1.php
ok here scrpt 1:
mysql_connect(localhost,$username,$password);
mysql_select_db($database) or die( "Unable to select database");
$result = mysql_query("select * from features where id=$choose");
$id = mysql_result($result, $i, "id");
$title = mysql_result($result, $i, "title");
$text = mysql_result($result, $i, "text");
$url = mysql_result($result, $i, "url");
echo "make changes";
echo "<form action ='e3.php' ";
echo " method ='post'>";
echo "Title<br>";
echo "<input name='titl'e value='$title'>";
echo "Text<br>";
echo "<textarea name='text'>$text</textarea>";
echo "URL<br>";
echo "</td>";
echo "<input name='url' value='$url'>";
echo "<input type='hidden' name='id' value='$choose'>";
echo "<br>ID = ";
echo "$id<br>";
echo "<input type='submit' value='save changes'>" ;
echo "</form>";
mysql_close();
}
else "no data was chosen";
?>
and SCRIPT 2 ----------------------------------
echo "ID = $id";
echo "title = $title";
echo "url = $url";
echo "text = $text";
mysql_connect(localhost,$username,$password);
mysql_select_db($database) or die( "Unable to select database");
mysql_error();
$query=mysql_query("UPDATE features SET url='$url', title='$title', text='$text' WHERE id='$id'");
mysql_query($query);
mysql_error();
$num = mysql_affected_rows();
if ($num>0) {
echo "data successfully changed";
}
else {
echo "data could not be changed";
}
mysql_close();
?>