Gird View in PHP

0 Roopavathy Baskaran · August 18, 2014
Hello there,

I am now learning PHP and developing websites.

Is there any ways to display data from mysql database using Grids? (i want grid view..So that I can edit the data dynamically).

Are there any video tutorials regarding these?

Please help me.

Thanks in advance. 


Post a Reply

Replies

Oldest  Newest  Rating
0 Roopavathy Baskaran · August 20, 2014
Thank you very much......Let me try and inform you.........
0 Jasmin Bakalović · August 19, 2014
This will help you:



You have link for source code in description, if you have problems with this, write, and i'll try to help you :)
0 Roopavathy Baskaran · August 19, 2014
Hi Jasmin,

Thanks a lot for your kind replies.Really very helpful.It works well.Thanks a lot for your help.

Is there any thing like we can edit data like this?

/images/forum/upload/2014-08-19/3cfdf266a22411176bee27e5bc23aef6.PNG


Here we can edit the last_name by clicking data directly and edit...
0 Roopavathy Baskaran · August 19, 2014
I want to know how to fetch the data from the table from MySQL database and display it in a grid view (not just tables) and edit it dynamically.(Like the one we can edit the value in phpmyadmin table views)...

I don't just want the code only...but want to learn...:P
0 JOhaL jaTT · August 18, 2014
@Roopavathy Baskaran  you mean how to display data from sql table to grid.
or you want code of display data. 
0 Jasmin Bakalović · August 18, 2014
You have a lot of tutorials for this. I created mini version of that what you want also i skipped security, just that you can realise how to do that.

My folder looks like this:
edit
-db
--connection.php => http://pastebin.com/p58XVwF0
-css
--main.css => http://pastebin.com/5ha3ZnPZ
index.php => http://pastebin.com/krigYhgE
edit.php => http://pastebin.com/GBZs6GAj

In file connection.php i included my database informations for connecting to database.

I won't explain main.css, just for style.

On index.php i showed all users from database but there is a link where we are going to file edit.php?id={some number}. This some number is important.

File edit.php allows us to edit user. The information of the user, we are getting from the link edit.php?id={some number}. And this {some number} we put in variable $id, so you have query to search that user by id.

I hope so you understand what i wrote :)
0 Roopavathy Baskaran · August 18, 2014
Then how can i edit the data dynamically?
0 JOhaL jaTT · August 18, 2014
you can use TABLE for grid view just like this 
echo "<table border='1'>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
<th>Hometown</th>
<th>Job</th>
</tr>";

while($row = mysqli_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['FirstName'] . "</td>";
  echo "<td>" . $row['LastName'] . "</td>";
  echo "<td>" . $row['Age'] . "</td>";
  echo "<td>" . $row['Hometown'] . "</td>";
  echo "<td>" . $row['Job'] . "</td>";
  echo "</tr>";
  }
echo "</table>";
0 Roopavathy Baskaran · August 18, 2014
Can any one help me?Please ... 

I googled....i found something as 

http://phpgrid.com/

But only in paid version we can edit.....

I want to study...how to display the table structure from the database...and modify it....

Please help me....
  • 1

PHP

107,321 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators