Hi i had been Using dreamweaver mx to try and create php pages, but have found that they make things harder to understand as a begginer.
But there is one small thing. At the moment to create the nav for a section on my site im calling the link names from the database so that if one was added it would reflect instantly. but ive found one small problem.
I'm using this piece of code to call the cname from the db:
$result = @("SELECT cname FROM countries");
if (!$result) { echo("<p>Error performing query: " . mysql_error() . "</p>"); exit(); }
while ( $row = mysql_fetch_array($result) ) { echo("<a href=\"\">" . $row["cname"] . "</a><br>"); }?>
I know that there is a way I can put all my query's in to a separate .php file to call them from there, but how? I'm needing to use the same thing again to call the cid, hence the empty link.
In dreamweaver it enabled you to create a recordset which contained all the rows.
any help would be grand.
Cheers Danny.