Okay there is a file called global.inc

<?php

// display a list from the DB

function list_of_maps () {
    
    db_connect ();
    $sql = "SELECT mapname,rowid FROM maps";
    $result = mysql_query($sql);
    
    while ($row = mysql_fetch_row ($result)) {
    return "<a href='viewonly.php3?mapid=$row[1]'>$row[0]</a><br>";  }
    
    }    



?>

But when I call it like this:

<?php

    include('global.inc');
    echo list_of_maps ();

?>

It only shows the first result from the db... How do I get it to list them
all?


Susan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to