Hello, Currently, I can create archived articles list on a page called archive_list.php. Each article can be clicked on and it opens in articles.php.
The extension looks like: ../articles.php?id=4
I want to be able to open the article with the 'name' of the article or name of the 'author' instead of using the ID number from the database table. However, '../article.php?title=The Day Blah Blah' does not work. It has spaces too...
Can anyone help? Is there a way to replace the spaces with underscores so it will work?
@@@@@@@@@@@@@@@@@@@@@@@
HERE is the code from ../article_list.php:
@@@@@@@@@@@@@@@@@@@@@@@
$sql = mysql_query("SELECT id, author, title FROM articles ORDER BY id ASC");
if ($myrow = mysql_fetch_array($sql)){
$id=$myrow["id"];
$insert_date=$myrow["insert_date"];
$author=$myrow["author"];
$title=$myrow["title"];
echo "<table class=table_general cellpadding=0 cellspacing=5>";
do {
printf("<tr bgcolor=#55556F><td valign=top width=150><b><a href=%s?id=%s>%s</a></b></td><td><div align=justify>%s ... <br><br><font color=#FFFF00>[<b><a href=%s?id=%s title=%s>READ FULL DEFINITION</a></b>]</font></div></td></tr>\n", "article.php", $myrow["id"], $myrow["title"], $myrow["author"], "article.php", $myrow["id"], $myrow["title"]);
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Suggestions?
~Shane