Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

PHP Data Table


  • Please log in to reply

#1
Tigger93

Tigger93

    Trusted Helper

  • Retired Staff
  • 1,870 posts
I'm back for some more help wit PHP. :whistling: Okay, here's an example of the html table I have:

===============================================
| Link:		   |  Date		|  Notes							|
===============================================
| 1.html		 | 4/25/2007 | Something						 |
| 2.html		 | 4/14/2007 | Something else...					   |
===============================================

Etc. Let's say I have another page where I could add a note for one of them, let's say the first entry. How could I do this but not have it show up for all of them? And I know it's prolly not a good idea to use HTML tables, let me know if you have any better ideas. :blink:

Thanks for any help!!! :help:

Tigger

Edited by Tigger93, 29 April 2007 - 10:28 AM.

  • 0

Advertisements


#2
mpfeif101

mpfeif101

    Member 1K

  • Retired Staff
  • 1,411 posts
Are the notes stored in a MySQL database?
  • 0

#3
Tigger93

Tigger93

    Trusted Helper

  • Topic Starter
  • Retired Staff
  • 1,870 posts
Yes.
  • 0

#4
mpfeif101

mpfeif101

    Member 1K

  • Retired Staff
  • 1,411 posts
Something like this should work (obviously this is a very basic table, you would need to add attributes to it like width, height, or css to it). Make sure you also connect to the database on the page and substitute the table and field names that I put with your own.

<?php

echo "
<table>
   <tr>
	  <td>Link:</td>
	  <td>Date:</td>
	  <td>Notes:</td>
   </tr>
";

$result=mysql_query("SELECT * from INSERTTABLENAMEHERE");
while ($object= mysql_fetch_array($result)) {

echo"
   <tr>
	  <td>$object[link]</td>
	  <td>$object[date]</td>
	  <td>$object[notes]</td>
   </tr>
";

}

echo "</table>";

?>

  • 0

#5
Tigger93

Tigger93

    Trusted Helper

  • Topic Starter
  • Retired Staff
  • 1,870 posts
Thanks. :whistling:
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP