Jump to content

Any php guru`s about?


Si...

Recommended Posts

As it is its simply redirecting back to the forum and ideally I would like it to automatically create a new page when a new topic in the specified forum is posted

eg "/forum/index.php?showtopic=1243" makes "/page?id=12", "/forum/index.php?showtopic=1267" makes "/page?id=13", where 12/13 are the newly created pages.

code:

$connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd") 

or die ("Couldn't connect to server.");

 

$db = mysql_select_db("$database_name", $connection)

or die("Couldn't select database.");

 

$query = ("SELECT title,tid,description FROM ibf_topics WHERE forum_id = 90 ORDER BY start_date ASC limit 30");

 

$result = mysql_query ($query);

while ($row = mysql_fetch_assoc ($result)) {

 

$tid = $row['tid'];

$title = $row['title'];

$des = $row['description'];

 

echo "<a href="forum/index.php?showtopic=$tid">$title $des</a><BR><BR>";

 

}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We and our partners use cookies on our website to give you the most relevant experience by remembering your preferences, repeat visits and to show you personalised advertisements. By clicking “I Agree”, you consent to the use of ALL the cookies. However, you may visit Cookie Settings to provide a controlled consent.