Jump to content

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


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)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.