VinceGledhill Posted August 13, 2012 Share Posted August 13, 2012 Hi People. This php loads all the airfield names into the correct place. <?php include("db_connect.php"); $users_sql = "SELECT * FROM users ORDER by username"; $users_query = mysql_query($users_sql) or die (mysql_error()); $rsUsers = mysql_fetch_assoc ($users_query); $id = ( !isset ( $id ) ) ? ( int ) $_GET [ "id" ] : $id ; ?> <h2>Airfields By Name</h2> <?php do { ?> <li><a href="<? echo $rs["user_id"]; ?>"><?php echo $rsUsers ['username']; ?> </a></li> <?php } while ($rsUsers = mysql_fetch_assoc ($users_query)); ?> See http://www.airfieldcards.com/vg_temp/by_name.php What do I need to add to the above php to load the actual airfield into results.php in order to show "results.php" in the section of the page where the map is currently shown. (known as "col1" in my css) Quote Link to comment https://forums.phpfreaks.com/topic/267005-how-do-i-get-this-to-show-form-in-correct-place/ Share on other sites More sharing options...
MMDE Posted August 13, 2012 Share Posted August 13, 2012 Unless I did some typo or something, I think this is what you want: $output = ''; while($rsUsers = mysql_fetch_assoc($users_query)){ $output .= '<li><a href="'.$rs['user_id'].'>'.$rsUsers['username'].'</a></li>'; } echo $output; Quote Link to comment https://forums.phpfreaks.com/topic/267005-how-do-i-get-this-to-show-form-in-correct-place/#findComment-1368939 Share on other sites More sharing options...
VinceGledhill Posted August 13, 2012 Author Share Posted August 13, 2012 Thanks for the input. Where do I put that into my code exactly, sorry, I am ancient. Quote Link to comment https://forums.phpfreaks.com/topic/267005-how-do-i-get-this-to-show-form-in-correct-place/#findComment-1369061 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.