Jump to content

Probably its very easy. just a little question.


PerenSap

Recommended Posts

Hello,

first im not english so please dont hate when ive wrote someting wrong..

well ive a little question. i made a drop down box and in this box i see (select * from naw) all de rows i have in 'naw'. i want to see all places i have my row called 'plaats' (db = ws2 -> naw -> row = plaats.)

<?php

 

 

mysql_connect('localhost', 'root', '');

 

 

mysql_select_db('ws2');

 

 

$result = mysql_query('SELECT * FROM naw');

while($row = mysql_fetch_array($result))

?>

 

 

<select name="hallo">

 

 

<?php

 

 

$i = 0;

 

 

while ($i < mysql_num_fields($result)){

 

 

  $fieldname = mysql_field_name($result, $i);

 

 

  echo '<option value="'.$fieldname.'">'.$fieldname.'</option>';

 

 

  $i++;

 

 

}

 

 

?>

 

</select>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.