enhu Posted November 17, 2008 Share Posted November 17, 2008 Fatal error: Call to undefined function get_the_subject_by_id() in C:\wamp\www\...\del_subject.php on line 10. This is the page for deleting a navigation links. so when i delete a page this error message appear and it wont delete the link. Please help me with this. <?php if (intval($_GET['subj']) == 0) { redirect_to("main.php"); } $id = mysql_prep($_GET['subj']); if ($subject = get_the_subject_by_id($id)) { $query = "DELETE FROM subjects WHERE id = {$id} LIMIT 1"; $result = mysql_query($query, $connection); if (mysql_affected_rows() == 1) { redirect_to("main.php"); } else { echo "<p>Subject deletion failed. </p>"; echo "<p>" . mysql_error() . "</p>"; echo "<a href=\"main.php\">Back to Main Page</a>"; } } else { redirect_to("main.php"); } ?> Thanks. Link to comment https://forums.phpfreaks.com/topic/133049-fatal-error-call-to-undefined-function-get_the_subject_by_id-in-cwampwww/ Share on other sites More sharing options...
DarkerAngel Posted November 17, 2008 Share Posted November 17, 2008 so I think you deleted a page that contained the function... I really don't know how much I can help since I have no idea what your using or what that function is used for (assuming something to do with a message subject) Link to comment https://forums.phpfreaks.com/topic/133049-fatal-error-call-to-undefined-function-get_the_subject_by_id-in-cwampwww/#findComment-691949 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.