Page 1 of 1

My Dilemma :P

Posted: Mon Jun 10, 2002 2:42 am
by Jim
I've created an system in which users submit articles through [url=http:www.aoe2.com/uploads/index.php"]this[/url] page. If you take a look, you can see what each article has in it.

That worked out fine (much thanks to MyDimension for his load of help) and now I've got one thing left to do. When an article is submitted, I'd like a links page to be updated to reflect both the new content, and the content that is already available.

But, uh....

How?

I'm not sure what exactly you want..

Posted: Mon Jun 10, 2002 12:42 pm
by Gremlin
but...
If you are already entering the new articles into a MySql DB, why not also include a db field for either the entire link, or a file name and use
a query to grab the list that way?
i.e.

Code: Select all

mysql_connect("...connection info...");
$query="Select web_url from articles";
$result="mysql_query($query) or die("something in my code blows");

if (mysql_num_rows($result) > 0)
{
        // print articles links
        while($row = mysql_fetch_object($result))
        {
         print("<a href=">");
         print($row->web_url);
         print(">$row->web_url</a>");
         &#125;
&#125;

// i know my print statements could be cleaned up.. but something 
//like this should help you out.

Posted: Mon Jun 10, 2002 12:53 pm
by Jim
Exactly the solution I was considering. (Just didn't know how :P) Thanks!