Hello ppl,
I have a verry weird problem 🙂. I made a simple news sistem for my site based on a db.
In my index file i see the title of my news, date when I posted and sumary of my news (20 words), at the end of sumary I put a link like this : ... [details] with an internal link like this
<a href="stirile.php#<? echo $data["id"]; ?>">[detalii]</a> in stirile.php I have all news posted and an internal link with this name <? echo $data["id"]; ?> . The links are working properly (when I rollover the link in status I see: stirile.php#12, when I press the link the stirile.php page will open and scrols till news with id 12, every thing is OK) but the title bar of stirile.php will be diplayed like this: Stirile - www.mysite.ro#12#12#12 . What I wrote in title bar is this: Stirile - www.mysite.ro , and nothing else. Why I see the id of news there? and whi I see the id three times???
Here is the index.php file (just the news part)
<?
$start = "0";
$posts = "6";
require ("database.inc.php");
$result = mysql_query ("SELECT * FROM stiri ORDER BY timestamp DESC LIMIT $start,$posts");
while ($data = mysql_fetch_array ($result))
{
?>
<tr><td><b><? echo $data["subject"]; ?></b></td><td>[<? echo date("d. m. Y", $data["timestamp"]) ?>] </td></tr>
<tr><td colspan="2"><? echo $data["small"]; ?> ... <a href="stirile.php#<? echo $data["id"]; ?>">[detalii]</a></td></tr>
<?
}
?>
Here is stirile.php file
<html>
<!-- Creation date: 28.10.2002 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Stirile - [url]www.mysite.ro[/url]</title>
<meta name="description" content="Stirile de azi">
<meta name="keywords" content="stiri, news, job, locuri de munca">
<meta name="author" content="Ovidiu Sopa">
<meta name="generator" content="AceHTML 5 Pro">
<link rel="StyleSheet" type="text/css" href="sibiul.css">
</head>
<BODY bgcolor="#F8C427">
<?
$start = "0";
$posts = "6";
require ("database.inc.php");
$result = mysql_query ("SELECT * FROM stiri ORDER BY timestamp DESC LIMIT $start,$posts");
while ($data = mysql_fetch_array ($result))
{
?>
<tr><td class="buttonleft"><img src="poze/sageata.gif" border="0" width="17" height="11" align="absmiddle"><a name="<? echo $data["id"]; ?>"></a><b><? echo $data["subject"]; ?></b></td><td class="buttonright" align="right">[<? echo date("d. m. Y", $data["timestamp"]) ?>] </td></tr>
<tr><td class="buttonin" colspan="2" align="justify"><? echo $data["content"]; ?></td></tr>
<?
}
?>
Any ideea???
See ya all