Hi all, I am trying to do a "Modify(UPDATE)" and DELETE but I keep on getting DB ERROR whenever I clicked on the links to "Modify" and "Delete"...Gone thru my code a few times but can't spot any error. Anyone can help?? Below is a snip of the code: ------------------------------------------------------------------------------- <? $dsn = "mysql://root:[EMAIL PROTECTED]/tb1"; $db = DB::connect ($dsn); if (DB::isError ($db)) die ($db->getMessage()); $result = $db->query($sql); if( DB::isError($result) ) { die ($result->getMessage()); } <? if($action==delete) { $sql = mysql_query ("DELETE FROM tutor WHERE tutor_id='$tutor_id'"); echo "The entry has been deleted <br><br>"; echo "<a href='../index/timetable_main.php'>Back to main</a>"; } if($action==edit) { $sql = mysql_query ("SELECT * FROM tutor WHERE id='$id'"); $row = mysql_fetch_array($sql); echo "<form name='edit_tutor' method='post' action='edit2.php'>"; echo "Tutor ID : ".$tutor_id."<br>"; echo "<input type='hidden' name='tutor_id' value='".$row[tutor_id]."'>"; echo "Name : <input name='tutor_name' type='text' value='" .$row [tutor_name]."'><br>"; echo "Contact No : <input type='text' name='tutor_contact' value='" .$content [tutor_contact]."'><br>"; echo "E-mail : <input type='texecho "Profile : <input type='text' name='tutor_profile' value='" .$content[tutor_profile]."'><br>"; echo "<input type='submit' name='Submit' value='Update'>"; echo "</form>"; }t' name='tutor_email' value='" .$content[tutor_email]."'><br>"; ?> ------------------------------------------------------------------------------- Irin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php