Alright well I have a script for my articles that is running great and when it displays and such it displays according to category on my site. Now, in my administration page I have add,edit,delete, etc for the articles. Inside each page (except delete) there is a Title, Article Section, and The Article itself. The title and article run in 1 mysql database but the article section is run on another. so basically the 1st is title, article_section, and article. the 2nd is just article_section. When I add a new article I select a section it should go into and it then lists it into that category on the page. Now when it comes to editing it doesn't automatically select the section it is in. (btw this is in a dropdown box). So anyways it isn't a huge deal but I was thinking of releasing this script to people because it is easy an effective and I see that as a good thing. I got most of it working to a degree except that when I try just editting an article it adds periods at the beginning and end of the category i.e. .Story/Poem. instead of Story/Poem like before.
This is the NEW modified code:
Article Section: <select name='article_section'>";
include_once('thisplaceiswhereitaccessesdb.php');
$Result = mysql_query("SELECT article_section FROM $database ORDER BY article_section ASC");
while ($row = mysql_fetch_object($Result)) {
if ($article_sec2 == $row->article_sec) {
echo "<option selected>$article_sec2</option>";
} else {
echo "<option>".$row->article_sec."</option>"; } }
echo "</select>
and the OLD code:
Article Section: <select name='article_section'>";
include_once('thisplaceiswhereitaccessesdb.php');
$Result = mysql_query("SELECT article_section FROM $database ORDER BY article_section ASC");
while ($row = mysql_fetch_object($Result)) {
echo "<option>".$row->article_sec."</option>"; }
echo "</select>