Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67497

The form tag is not display in a php loop

$
0
0

I am making a table that shows some data and I have it in a while where the data from the database is taken. the problem is that I need a form tag for each of the tr to be able to take the data later, this works in all but not in the first field. Code:

while ($fila=mysqli_fetch_row($resultado)){
    $user_name = $fila[0];
    //echo '<script>alert("'.$user_name.'");</script>';
    $last_name = $fila[1];
    $email1 = $fila[2];
    $id = $fila[3];
    echo '<form id="update_user'.$id.'" name="update_user'.$id.'" action="" method="post">';
    echo '<tr>';
        echo '<td class="quit_click" id="nombre'.$id.'"><input id="innombre'.$id.'" name="innombre" type="text" value="'.$last_name.'"/></td>';
        echo '<td class="quit_click" id="user'.$id.'"><input id="inuser'.$id.'" name="inuser" type="text" value="'.$user_name.'"/></td>';
        echo '<td class="quit_click" id="email'.$id.'"><input id="inemail'.$id.'" name="inemail" type="text" value="'.$email1.'"/></td>';
        echo '<td class="quit_click" id="pass'.$id.'"><input id="inpass'.$id.'" name="inpass" type="text" value="********"/></td>';
    echo '</tr>';
    echo '</form>';
}

In all fields it shows the form and the tr minus in the first one that only shows the content of the tr, does anyone know why? If more code is needed, tell me

Thank you.


Viewing all articles
Browse latest Browse all 67497

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>