Jump to content

object not found!


gaugeboson

Recommended Posts

<?php

 

include("dfconfig.php");

 

if(isset($_GET['id']) == TRUE) {

  if(is_numeric($_GET['id']) == FALSE) {

    $error = 1;

    }

    if($error == 1) {

      header("Location: " . $config_basedir);

        }

 

    }

    else {

      header("Location: " . $config_basedir);

      }

    require("dfheader.php");

 

    $topic = "SELECT topics.subject,

    topics.forum_id, forums.name FROM topics,

    forums WHERE topics.forum_id = forums.id

    AND topics.id = " . $validtopic . ";";

    $topicresult = mysql_query($topicsql);

 

    $topicrow = mysql_fetch_assoc($topicresult);

 

    echo "<h2>" . $topicrow['subject'] . "</h2>";

 

    echo "<a href='dfindex.php'>" . $config_forumsname

    . " forums</a> -> <a href='dfviewforum.php?id="

    . $topicrow['forum_id'] . "'>" . $topicrow['name']

    . " </a><br /><br />";

 

    $threadsql = "SELECT messages.*, users.username

    FROM messages, users WHERE messages.user_id

    = users.id AND messages.topic_id = " . $validtopic

    . " ORDER BY messages.date;";

    $threadresult = mysql_query($threadsql);

 

    echo "<table>";

 

    while($threadrow = mysql_fetch_assoc($threadresult)) {

      echo "<tr><td><strong>Posted by <i>"

      . $threadrow['username'] . " </i> on "

      . date("D jS F Y g.iA", strtotime($threadrow['date']))

      . " - <i>" . $threadrow['subject']

      . " </i></strong></td></tr>";

        echo "<tr><td>" . $threadrow['body']. "</td></tr>";

        echo "<tr></tr>";

        }

 

        echo "<tr><td>[<a href='dfreply.php?id=" . $validtopic .

        "'>reply</a>]</td></tr>";

        echo "</table>";

 

      require("dffooter.php");

      ?>

 

So when I run this with just the config, header, and footer files, it works.  Inserting all of the other code for some reason gives me the 'object not found' error message.

Link to comment
https://forums.phpfreaks.com/topic/92546-object-not-found/
Share on other sites

<?php

 

$dbhost = "localhost";

$dbuser = "";

$dbpassword = "";

$dbdatabase = "forum";

 

$config_forumsname = "CineForums";

 

$config_admin = "";

$config_adminemail = "";

 

$config_basedir = "http://127.0.0.1/sites/forums/";

 

?>

 

There is no error message pointing out a particular line.  I simply get an error 404 message.

Link to comment
https://forums.phpfreaks.com/topic/92546-object-not-found/#findComment-474201
Share on other sites

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.