Solved

insted of echoing this to the page(printing it) how can i make it in a dropdown box

Posted on 2004-10-22
210 Views
Last Modified: 2008-03-06
the below code outputs this to the screen how do i get the info to be in a dropdown box(combobox)

for($i = 0; $i < $Users->Count; $i++){
    $MailBox->UserName = $Users->Items($i)->UserName;

     echo "UserName       : " . $Users->Items($i)->UserName ."<br>";
 }

thx
Johnny
aka Pern
0
Question by:Johnny
    3 Comments
     
    LVL 27

    Accepted Solution

    by:
    Something like this should work for you

    <select name="username">
    <?php
    for($i = 0; $i < $Users->Count; $i++){
     echo "<option>" . $Users->Items($i)->UserName ."</option>";
     }
    ?>
    </select>
    0
     

    Author Comment

    by:Johnny
    perfect thx
    0
     
    LVL 27

    Expert Comment

    by:Diablo84
    no problem :)
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    This is a general how to create your own custom plugin system for your PHP application that you designed (or wish to extend a third party program to have plugin functionality that doesn't have it yet).  This is not how to make plugins for existing s…
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    933 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now