PHP Code Function Question
#1
Greetings,
I am very not good with PHP, and I have a question about what the following code in bold is for:
showthread.php Wrote:$query = $db->query("SELECT pid FROM ".TABLE_PREFIX."posts WHERE tid='".$nextthread[tid]."' ORDER BY dateline DESC LIMIT 0, 1");
$pid = $db->result($query, 0);
header("Location:showthread.php?tid=$nextthread[tid]&pid=$pid#pid$pid");
}
Is see this "header("Location.... thing quite a bit, and would like to know what purpose it serves.

Thanks!
Reply
#2
It's a reditect function. As soon as the function is executed. you will be redirected to showthread.php?tid=$nextthread[tid]&pid=$pid#pid$pid
Reply
#3
Thanks for the explanation!

Does this function also affect where the navigation links to?
Reply
#4
No, the navigation links are normal html <a href=...> tags.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)