Problems saving a data

0

I am trying to insert a data that I extract from a list, but when choosing the data (eg: Esteban), just save the E .

Here is a fragment of the code.

<td>
    <select name="noap" id="noap">
        <option value="<?php  $row['noap'] ?>" selected="selected"><?php echo $row['noap'] ?></option>

        <?php
            $sql3 = 'SELECT * FROM conductor ORDER BY nomapell';
            $result3 = mysqli_query($connex, $sql3);

            if (mysqli_num_rows($result3) > 0) {

                while($row3 = mysqli_fetch_assoc($result3)) {
        ?>
                    <option value="<?php echo $row3['nomapell']; ?>" > <?php echo $row3['nomapell']; ?></option>
        <?php  
                }
            }
        ?> 

    </select>
</td>
    
asked by Leonardo Rodríguez 18.04.2018 в 18:40
source

1 answer

0

I was able to solve it by placing this: [] to the name and to the id, the script that receives the code has this:

$chkcount = count($id);
for($i=0; $i<$chkcount; $i++)
	{

	if ($connex->connect_error) {
    die("Connection failed: " . $connex->connect_error);
} 


y el uptade table etc
    
answered by 18.04.2018 в 20:42