can any body help me with the below code correct code
Posted: Wed Dec 20, 2017 5:19 pm
Notice: Undefined index: memberID in /opt/lampp/htdocs/wwwroot/firstrepus/transfersta.php on line 81
Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'username' in 'where clause' in /opt/lampp/htdocs/wwwroot/firstrepus/transfersta.php:82 Stack trace: #0 /opt/lampp/htdocs/wwwroot/firstrepus/transfersta.php(82): PDO->prepare('SELECT * FROM t...') #1 {main} thrown in /opt/lampp/htdocs/wwwroot/firstrepus/transfersta.php on line 82
above was the result can anybody help me with this
Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'username' in 'where clause' in /opt/lampp/htdocs/wwwroot/firstrepus/transfersta.php:82 Stack trace: #0 /opt/lampp/htdocs/wwwroot/firstrepus/transfersta.php(82): PDO->prepare('SELECT * FROM t...') #1 {main} thrown in /opt/lampp/htdocs/wwwroot/firstrepus/transfersta.php on line 82
above was the result can anybody help me with this
Code: Select all
<?php require_once('includes/config.php');
$username = $_REQUEST['memberID'];
$stmt = $db->prepare("SELECT * FROM transfer WHERE username ='$memberID'");
$stmt->execute();
while($row=$stmt->fetch(PDO::FETCH_ASSOC))
{
?>
<tr>
<td><?php echo $row['memberID']; ?></td>
<td><?php echo $row['username']; ?>
<td><?php echo $row['names']; ?></td>
<td><?php echo $row['accountno']; ?></td>
<td><?php echo $row['gender']; ?></td>
<td><?php echo $row['dob']; ?></td>
<td><?php echo $row['typeofaccount']; ?></td>
<td><?php echo $row['amount']; ?></td>
<td><?php echo $row['active']; ?></td>
<td><a href="edit.php?Edit=<?php echo $row['memberIDid']; ?>">
<button class="btn btn-Primary">Transfer</button></a>
</td>
</tr>
<?php
}
?>