hi guys
i can change/update all the variables from a form that have created and has no error but there is one variable that don't update and it stay the same
and that was $title, i have no idea.
can you please tell me what's wrong with my codes below?
<?php
$max_rec=count($_POST['title']);
if(isset($_POST['Update'])) {
for($i=0; $i<$max_rec; $i++) {
#$title_look = $_POST['topic2'][$i];
$title_tmp=$_POST['title'][$i];
$descrip_tmp=$_POST['descrip'][$i];
$url_tmp=$_POST['url'][$i];
$query = "UPDATE topics SET title='$title_tmp', description='$descrip_tmp', url='$url_tmp' WHERE title='$title_tmp'";
mysql_query($query) or die("Update failed!<br>".mysql_error());
}
//for successful verification
#if(mysql_affected_rows()!='0') {
echo "<h4>Record(s) was successfully modified!</h4>";
}
?>
SUPER THANKS in advance.