Hello,
I have a news portal that displays the entire articles only after the user clicks (more...) link I provide at the end of each first paragraph or the title...
the code to link to the whole article page is like this:
while ($row = mysql_fetch_array($query)) {
echo"<p class='newstitle1'>" . $row['date']."<br/>". $row['title'] . "</p>".
"<p id=newstext1>" . $row['par1'];
$b=$row['id'];
echo"<a href='ai/display_ai_whole.php?id=$b'".">"."(more...)"."</a>" ; }
and
The example url of the whole article page looks like this:
......com/ai/display_ai_whole.php?id=21
I want two things:
1-The url of the whole article should also display keywords for SEO reasons. Say, first 4 words of the title of the article. (title of each article is stored as a separate column for each article by the way). How can I do that?
2-I want the id numbers to be at least 3 digits. So far they are up to two digits only and there is a long way to 100 for each category. So an added zero in the beginning should do it. How can I do that?
Note: I was told on other web forums to use url rewrite but I am still not sure if that is better or modifying the URL like this with php for good. I am assuming using php and making the real url have keywords is better, am I correct?