help with show thread script!
Posted: Wed Sep 10, 2008 10:07 pm
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!
<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!