Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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