Results 1 to 4 of 4
Sep 12, 2012, 19:41 #1
- Join Date
- Aug 2010
- 2 Post(s)
- 0 Thread(s)
Expanding Content without Breaking My Code?!
My website is about finished, but this past weekend something occurred to me that I fear will break all of the code I have written!!
The majority of my website revolves around Articles, and right now I have this simple structure...
WebRoot (directory) articles (directory) index.php article.php add_comment.php edit_comment.php rate_article.php
The problem is that as more and more Articles are added, there will be a need to break things up into sections, just like a newspaper (e.g. Current Events, World, Local, Sports, Money, Entertainment, etc.)
Unfortunately, all of the files in my "articles" directory contain code like this...
$_SESSION['articleReturnPath'] = "/articles/$slug";
<li><a href="#here">Make a Comment</a></li>
<li><a href="<?php echo "/articles/join-article-thread/$slug"; ?>">Subscribe to Thread</a></li>
<li><a href="<?php echo "/articles/rate-this-article/$slug"; ?>">Rate this Article</a></li>PHP Code:
$_SESSION['returnToPage'] = "/articles/edit-comment/$slug/$user/$commentID";
So, since all of my scripts which support Articles revolve around this paradigm, I fear I am screwed if I add new sections or sub-divide things...
What would I need to do if I wanted to switch from URL's like this....
To something like either this...