Dies ist mein JavaScript-CodeWarum erhält mein Skript nur die erste Zeile meiner PHP-Tabelle? unten ist mein Code
$('input#name-submit').on('click', function() {
var name = $('input#name-submit').val();
if($.trim(name) != ''){
$.post('getmodalreasonUT.php', {name: name}, function(data) {
alert(data);
});
}
});
und das ist mein PHP-Code
<?php
if(isset($_POST['Pending'])){
echo "<header class='panel-heading'> Undertime Pending</header>";
echo "<table class='table table-bordered'>
<thead>
<tr class='tbl-record'>
<th>ID</th>
<th>Name of Employee</th>
<th>Position</th>
<th>Date Filed</th>
<th>Number of hours</th>
</tr>
</thead>
<tbody>";
$sql = "SELECT * FROM utrequestform WHERE user_eid = '$employeenumber' and check_managerandsspv = '0'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()){
echo "<tr class='tbl-info text-center'>
<td>".$row['user_eid']."</td>
<td>".$row['nameofemployee']." </td>
<td>".$row['position']."</td>
<td>".$row['datefiled']."</td>
<td>".$row['noofhours']."</td>
<td><input type='submit' id='name-submit' value='$row[id]'></td>
</tr> ";
}
}else{
echo "<tr><td colspan='10'>No pending UT request.</td></tr>";
}
echo "</tbody></table>";
}
?>
Das ist mein Echo PHP-Code.
<?php
include ('connection.php');
$please = $_POST['name'];
echo $please;
?>
könnten Sie uns Ihre Datenbankstruktur zeigen !! – PacMan
Wie lade ich ein Bild hoch? –
Sie haben ein Bildsymbol in den Barwerkzeugen klicken Sie darauf und durchsuchen Sie Ihr Bild. – PacMan