listing [solved]

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
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

listing [solved]

Post by gaogier »

i have this code, which lists things like, http://runehints.com/Agility.php you can see them all here, http://runehints.com

but, i am now changing the way the site works, (using databases, and an admin panel that allows staff to keep data up to date, i have a problem with that, which can be found here

this problem is more likely to be alot easier

the code to list the first (origanal links)

Code: Select all

<?php
require_once ('../mysql_connect.php');//connect to db
        $skill_query = "SELECT id, name FROM skills ORDER BY name ASC";
    
    $skills_result = mysql_query ($skills_query);
	    while ($skills_row = mysql_fetch_assoc($skills_result)) {
        $skills_name = $skills_row['name'];  
		      
		 	echo"<img src=\"images/none.gif\" height=\"10\" width=\"10\">&nbsp;<a href=\"{$skills_row['name']}.php\">$skills_name</a><br>";  
			    }

	?>
and here is what i need that to be, but i need the link to be something like this, http://runehints.com/skills.php?flibble ... &id=3&ic=1

please not the id=3 will change per link, eg, it could be http://runehints.com/skills.php?flibble ... d=233&ic=1[/url]
Last edited by gaogier on Tue Apr 11, 2006 6:04 pm, edited 1 time in total.
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Post by gaogier »

can someone help with this?
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Post by gaogier »

$id = $skill_row['id'];

echo"<img src=\"images/none.gif\" height=\"10\" width=\"10\">&nbsp;<a href=\"skills.php?flibble=skillview&id=$id&ic=1\">$skill_name</a><br>";
}


solved
Post Reply