- Messages
- 21
- Reaction score
- 0
- Points
- 26
Hi, hihingi lang po ng tulong...
Originally may
"
$stmt = $db_con->prepare("SELECT * FROM tbl_users ORDER BY userID DESC");
$stmt->execute();
while($row=$stmt->fetch(PDO::FETCH_ASSOC))
"
working yan pag ganyan sa dating template...
pero since nag bootstrap na ako m
Fatal error: Call to a member function prepare() on a non-object in /home/crosswayprinting/public_html/ztest2/functions/admn/admn_account.php on line 39
^^^^^^^^^^
This code above works naman pero... kung anu nakalogin ngaun [ pag ako naka login mismo un lng makikita ko sa list...]
gusto ko sana makita lahat ng users na naka reg sa database ko...
ano pa bang ibang paraan para mafetch ang users ??
Originally may
"
$stmt = $db_con->prepare("SELECT * FROM tbl_users ORDER BY userID DESC");
$stmt->execute();
while($row=$stmt->fetch(PDO::FETCH_ASSOC))
"
working yan pag ganyan sa dating template...
pero since nag bootstrap na ako m
Fatal error: Call to a member function prepare() on a non-object in /home/crosswayprinting/public_html/ztest2/functions/admn/admn_account.php on line 39
Code:
</head>
<body>
<div class="container">
<h2 class="form-signin-heading">Account Management</h2><hr />
<button class="btn btn-info" type="button" id="btn-add"> <span class="glyphicon glyphicon-pencil"></span> Add User</button>
<button class="btn btn-info" type="button" id="btn-view"> <span class="glyphicon glyphicon-eye-open"></span> View User</button>
<hr />
<div class="content-loader">
<table cellspacing="0" width="100%" id="example" class="table table-striped table-hover table-responsive">
<thead>
<tr>
<th>User ID</th> <!-- 1 -->
<th>Username</th> <!-- 2 -->
<th>Password</th> <!-- 3 -->
<th>First Name</th> <!-- 4 -->
<th>Last Name</th> <!-- 4 -->
<th>Middle Name</th> <!-- 4 -->
<th>Email</th> <!-- 4 -->
<th>Address</th> <!-- 4 -->
<th>Secret Question</th> <!-- 4 -->
<th>Secret Answer</th> <!-- 4 -->
<th>LoA</th> <!-- 4 -->
<th>edit</th>
<th>delete</th>
</tr>
</thead>
<tbody>
<?php
{
?>
<tr>
<td><?php echo $row['userID']; ?></td> <!-- 1 -->
<td><?php echo $row['userName']; ?></td> <!-- 2 -->
<td><?php echo $row['userPass']; ?></td> <!-- 3 -->
<td><?php echo $row['userfirstName']; ?></td> <!-- 4 -->
<td><?php echo $row['userlastName']; ?></td> <!-- 4 -->
<td><?php echo $row['usermiddleName']; ?></td> <!-- 4 -->
<td><?php echo $row['userEmail']; ?></td> <!-- 5 -->
<td><?php echo $row['userAddress']; ?></td> <!-- 5 -->
<td><?php echo $row['userSecretQuestion']; ?></td> <!-- 5 -->
<td><?php echo $row['userSecretAnswer']; ?></td> <!-- 5 -->
<td><?php echo $row['userLOA']; ?></td> <!-- 5 -->
<td align="center">
<a id="<?php echo $row['userID']; ?>" class="edit-link" href="#" title="Edit">
<img src="edit.png" width="20px" />
</a></td>
<td align="center"><a id="<?php echo $row['userID']; ?>" class="delete-link" href="#" title="Delete">
<img src="delete.png" width="20px" />
</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
<br />
<div class="container">
<div class="alert alert-info">
<a href="http://localhost/tags/home.php" target="_blank">Crossway Printing</a>
</div>
</div>
</body>
</html>
^^^^^^^^^^
This code above works naman pero... kung anu nakalogin ngaun [ pag ako naka login mismo un lng makikita ko sa list...]
gusto ko sana makita lahat ng users na naka reg sa database ko...
ano pa bang ibang paraan para mafetch ang users ??