Hey there Im tring to insert to a database from a form , however I cant get it to insrt with the dropdwon list, any help would be loved
<h1>Insert Data Into Database Using CodeIgniter</h1>
<?php echo form_label('lecturer_id:'); ?> <?php echo form_error('dname'); ?>
<?php echo form_input(array('id' => 'dname', 'name' => 'dname')); ?>
<?php echo form_label('subject_id :'); ?> <?php echo form_error('demail'); ?>
<?php echo form_input(array('id' => 'demail', 'name' => 'demail')); ?>
<?php echo form_label('coarse_name :'); ?> <?php echo form_error('dmobile'); ?>
<?php echo form_input(array('id' => 'dmobile', 'name' => 'dmobile')); ?>
<?php echo form_label('Coarse_description :'); ?> <?php echo form_error('daddress'); ?>
<select name="daddress">
<?php $sql = "select id, email from coarse_lecturers ";
$result = mysql_query($sql);
echo "<select name='id'><option value=''>Please Select </option>";
while ($row = mysql_fetch_array($result)){
Im tring to remember what is selected then add it to a table
echo"<option value = '" . $row['id'] . "'>" . $row['email'] . "</option>";
array('id' => 'daddress', 'value' => 'daddress');
}
echo "</select>";
?>
<?php echo form_submit(array('id' => 'submit', 'value' => 'Submit'));?>
<?php echo form_close(); ?>