The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
basically i'd like to input a thread name a la:
script.php?subject=Blah and then do $thread = "News: ".$subject; and then pull the latest thread with that name out of the db, get its threadid, and print a header redirecting the person to that thread. this isnt working though: Code:
<?
require("global.php");
$title="News: ".$subject;
// echo "$title"; //debug
$threads = $DB_site->query("SELECT threadid FROM thread WHERE title=$title");
while ($thread = $DB_site->fetch_array($threads)) {
// echo "$thread[0]"; //debug
$url="http://www.tribalwar.com/forums/showthread.php?threadid=".$thread[0];
// echo "<a href=$url>test</a>"; //debug
header("Location: $url");
}
?>
this is for the newspro/vB integration, im working on a 'Comment on this news>>' link, and eventually i'd like to put the newsid in the thread\notes part of the table, but i thought i'd stick to this for now. any ideas? Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
$threads = $DB_site->query("SELECT threadid FROM thread WHERE title='".addslashes($title)."'");
|
|
#3
|
|||
|
|||
|
i love you
|
![]() |
|
|