I have created a simple script which takes values from database(memebers table) and put them into 'select' form.
I works, however not exacly as I want.
<?php
include ("connectiontomembers.php");
$sql = "SELECT * FROM members";
$res = mysql_query($sql);
while ($field = mysql_fetch_array($res))
{
$username = $field['username'];
//echo 'Username: ' . $field['username'] . '<br />';
$array = array("$username");
echo "<select name=\"name\">";
foreach($array as $value) {
echo "<option value=\"$value\">$value</option>";
}
echo "</select>";
}
?>
I takes values from databas but every user is in seperate 'option'.
Just take a look.

To be hones, I have realized that using this 'technic' for selecting users(by admin) is not good idea. For longer run(many records in database) it would be useless. Nomatter of what I'm going to try finish this.
Have a nice day.
This post has been edited by MartinPL: 13 May 2009 - 02:18 AM

New Topic/Question
Reply




MultiQuote




|