Hi
I am new to PHP and need a help regarding data controls in PHP.
Like grid view?
Thanks
Hi
I am new to PHP and need a help regarding data controls in PHP.
Like grid view?
Thanks
Jump to PostPlease explain what you want. Something like this or this perhaps?
Jump to PostAlready posted an almost ready solution. Try it.
Already posted an almost ready solution. Try it.
Already posted an almost ready solution. Try it.
this is my code
<?php
require_once 'Database.php';
$connect =new DB;
$connect ->connect();
// *** Turn on error reporting for debug purposes.
// *** Remove for production code.
error_reporting(E_ALL);
ini_set("display_errors", 1);
// *** Get list of users from the db.
$sql = "SELECT * FROM usersinfo";
$result = mysql_query($sql);
if (!$result) {
exit("QUERY ERROR: " . mysql_error());
} else {
// *** Display the user list.
$tableRow = '';
while($row = mysql_fetch_assoc($result)) {
$user_id = $row;
$user_name = $row;
$tableRow .= "<tr> <td>$user_id</td> <td>$user_name</td> <td> <a href=\"delete_user.php?id=$user_id\"> Delete </a> </td> </tr>";
}
$tableHeader = "<tr> <th>USER ID</th> <th>USER NAME</th> <th>ACTION</th> </tr>";
echo("<table>$tableHeader $tableRow </table>");
}
mysql_close($conn);
?>
How to do paging for this code?
Choose one solution and read the manual.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.