I've seen tons of URLs with a #( like http://aforum.not/viewpost.php?id=4#post3)
I can only guess that it's something like a ?post=3
But I want some clarification.
Printable View
I've seen tons of URLs with a #( like http://aforum.not/viewpost.php?id=4#post3)
I can only guess that it's something like a ?post=3
But I want some clarification.
for example you got 2 long postes, and you wont want to let users to scroll you just do:
myfile.html#post2
The top of the browser starts at post2Code:<a name="post1"></a>
Post 1
<a name="post2"></a>
Post 2
Basically an identifier for positioning on a page
Well, I am making a forum right now.
But, how would I define the post3 or whatever?
---------- Post added at 11:36 AM ---------- Previous post was at 11:29 AM ----------
I just did some fast research, and I found out that I'm supposed to put an a name tag where i want it to point.
So would I put the <a name>, after the first echo " ?
Code:while($nfo = mysql_fetch_array($select_res))
{
echo "<tr><td align=\"left\" width=\"15%\" valign=\"top\" class=\"forum_header\">Author</td><td colspan=\"2\" align=\"left\" class=\"forum_header\"><b>".$nfo['title']."</b> - Posted On: <em>".$nfo['time']."</em></td></tr>\n";
echo "<tr><td align=\"left\" width=\"15%\" valign=\"top\" class=\"forum_header\">".getName($nfo['posterid'], true)."<br>".getCustomText($nfo['posterid'])."<br>Post Count: ".getPostcount($nfo['posterid'])."\n";
echo "<td align=\"left\" width=\"100%\" valign=\"top\" class=\"forum_header\">\n";
echo parseMessage(nl2br($nfo['message']));
echo "</td>\n";
echo "</tr>\n";
}
if i were you, id add something in to the title of each new post. just wrap it around the title when you echo it out. simpleeees.. :P
You dont need to use the A tag, you could simply add it into one of your existing tags...
Code:while($nfo = mysql_fetch_array($select_res))
{
echo "<tr><td align=\"left\" width=\"15%\" valign=\"top\" class=\"forum_header\" name=\"namehere\">Author</td><td colspan=\"2\" align=\"left\" class=\"forum_header\"><b>".$nfo['title']."</b> - Posted On: <em>".$nfo['time']."</em></td></tr>\n";
echo "<tr><td align=\"left\" width=\"15%\" valign=\"top\" class=\"forum_header\">".getName($nfo['posterid'], true)."<br>".getCustomText($nfo['posterid'])."<br>Post Count: ".getPostcount($nfo['posterid'])."\n";
echo "<td align=\"left\" width=\"100%\" valign=\"top\" class=\"forum_header\">\n";
echo parseMessage(nl2br($nfo['message']));
echo "</td>\n";
echo "</tr>\n";
}