<?php require_once('../Connections/cmctrfdb.php'); ?>

<?php require_once('../webassist/mysqli/rsobj.php'); ?>

<?php

$langselect = new WA_MySQLi_RS("langselect",$cmctrfdb,0);

$langselect->setQuery("SELECT * FROM languages");

$langselect->execute();

?>

<?php

$langidsel=$user->present()->langid;

$langintable = new WA_MySQLi_RS("langselect",$cmctrfdb,0);

$langintable->setQuery("SELECT * FROM languages WHERE idlanguages='$langidsel'");

$langintable->execute();

?>

<?php



$lang=$langselect->getColumnVal("acronym_languages");

?>



<select name="langid" id="langid">

  <?php

while(!$langselect->atEnd()) { //dyn select

?>

  <option value="<?php echo($langselect->getColumnVal("idlanguages")); ?>"<?php if (!(strcmp($langselect->getColumnVal("idlanguages"), ($langintable->getColumnVal("idlanguages"))))) {echo "selected=\"selected\"";} ?>><?php echo($langselect->getColumnVal("name_languages")); ?></option>

  <?php

  $langselect->moveNext();

} //dyn select

$langselect->moveFirst();

?>

</select>