02-17-2008, 06:15 AM
|
#3 (permalink)
|
|
The Addict
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
|
Quote:
Originally Posted by Andrew
After the while block, add in:
And also add in a period before the first equal sign within the while block.
|
i put the echo and still doesnt work.
here is my function now
Code:
function dyn_dropdown($tablename,$columnname) {
$query = mysql_query("SELECT $columnname FROM $tablename");
if(mysql_num_rows($query))
{
while($row = mysql_fetch_assoc($query))
{
$options = $row['columnname'];
echo "<option>$options</option>";
}
}
else {
echo "<option>no data</option>";
}
__________________
no signature set
|
|
|
|