Jump to content

Fatal error: Call to undefined function get_the_subject_by_id() in C:\wamp\www\


enhu

Recommended Posts

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.

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)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.