My Dilemma :P

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jim
Forum Contributor
Posts: 238
Joined: Fri Apr 19, 2002 5:26 am
Location: Near Austin, Texas

My Dilemma :P

Post 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?
Gremlin
Forum Newbie
Posts: 13
Joined: Thu May 02, 2002 7:03 pm
Location: California
Contact:

I'm not sure what exactly you want..

Post 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.
Jim
Forum Contributor
Posts: 238
Joined: Fri Apr 19, 2002 5:26 am
Location: Near Austin, Texas

Post by Jim »

Exactly the solution I was considering. (Just didn't know how :P) Thanks!
Post Reply