Jump to content

Listar Registos de uma tabela numa listbox


Recommended Posts

Posted

Boa tarde,

É o seguinte estou a tentar listar os campos de uma tabela numa listbox, para posteriormente seleccionar um e alterar. Alguém me pode dar umas dicas como fazer isto?

Obrigado.

Posted

deixo-te aqui um exemplo 😄

echo "<select name='skin'>";
$rsql = mysql_query("SELECT * FROM skins");
while($rs = mysql_fetch_array($rsql)) {
echo "<option value='".$rs['sid']."'>".$rs['name']."</option>";
}
echo "</select>";

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. 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.