help with show thread script!

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
mickhal
Forum Newbie
Posts: 6
Joined: Wed Sep 10, 2008 9:16 am

help with show thread script!

Post by mickhal »

I have a forum at yamoto-studios.com/forum, everytime I try to enter the thread URL on my browser it brings me to a page that says "No thread specified". Here's the script:
<html>
<head>
<?
// gothread.php
if (!isset($threadID)) {
echo "No Thread Specified";
exit();
} else {
include('./db.php');
// Connect to database
$link = dbConnect();
//let's get the forumID from threadID
$query = "SELECT forumID FROM forumThreads WHERE threadID = $threadID";
// Execute the query
$result = @mysql_query($query);
$forum = mysql_fetch_array($result);
$forumID = $forum['forumID'];
}
//if skin is set, make sure they go to the right place
if(isset($userdetails[3])){
$location = "$installDirectory".$userdetails[3]."/";
}else{
$location = "$installDirectory"."default/";
}
?>
<script language="JavaScript">
function submitForm()
{
document.form1.submit();
}
</script>
</head>
<body onLoad="submitForm();">
<form name="form1" method="POST" action="<? echo $location; ?>">
<input type="hidden" name="f" value="<? echo $forumID; ?>">
<input type="hidden" name="t" value="<? echo $threadID; ?>">
</form>
</body>
</html>

Please help me! I have no idea what's wrong with it!
pawarnilesh4u
Forum Newbie
Posts: 6
Joined: Thu Aug 21, 2008 10:16 am
Location: Mumbai - India

Re: help with show thread script!

Post by pawarnilesh4u »

its right as seen from your code.
you are not assignin any value to $threadID before this code

if (!isset($threadID)) {
echo "No Thread Specified";
exit();
}

so defenitely it will be always found as unset and will display "No Thread Specified"
Post Reply