How to create listview in a web page? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to create listview in a web page?

nicolemorfsnicolemorfs Posts: 1Member
This is my first time to make a web page . I'm using PHP and Mysql database. I've already connected the database, and creating the table. Here's the code:

Database Connection:

1 <?php
2 mysql_connect("localhost", "root") or die(mysql_error());
3 echo "Connected to MySQL<br />";
4 ?>

Creating Table:

01 <?php
03 mysql_connect("localhost", "root") or die(mysql_error());
04 mysql_select_db("Stud_Info") or die(mysql_error());
06 mysql_query("CREATE TABLE Student_Info(
09 name VARCHAR(30),
10 age INT)")
11 or die(mysql_error());
13 echo "Table Created!";
15 ?>

I want the information will show to the web page by using list view or data grid . But my problem is code of that. I try to find many codes but i didn't make it ..

Can you share me some of your codes or just guide me on how to do it. please......

it is my Pleasure ... Thanks... :D



[link=]Plumber Columbia SC[/link]
[link=]Lexington SC Plumber[/link]


  • pseudocoderpseudocoder Posts: 688Member ✭✭✭

    One thing you might try is using a scrolling div within a table


    $res = mysql_query("select * from Student_Info");
    if(mysql_num_rows($res) > 0) {
    while($row = mysql_fetch_assoc($res)) {
    echo "" .
    "" .
    "" .
    " . $row['id'] . "" . $row['name'] . "" . $row['age'] . "


    It's super late for me, but hopefully it's valid code... my eyeballs are blurry. :D I didn't do any formatting of the table(s), but maybe something like that.

Sign In or Register to comment.