Hello Daniweb community

firstly i would like to thank you for reading this

So i am working on a server for a friend of mine, and i am fairly new to PHP, the server is at ambience.selfip.org

site is going fairly good so far, i went through a few ideas, no flashy content yet, its a work in progress.

but i have the changelog, seen on the site, and there are a few other people that need access to it, and rather than edit it all myself, i would like to create a form, and use php to add content to the database, which i can then call upon to show the data....

so i can make the form to add it to the database, that much is easy, but i want the page that shows the php based changelog to retain colors for each type of change made, i thaught about making different forms and different sections in the changelog page for each type, and different database tables. to get the different colors, but i would like them to be in the order that we made them, and i cannot find a way to do this.

and the other thing i would like to do is add a timestamp with the date.

so that when it shows the data... its like

3/9/09 3:45 pm New server made by Ryan

or something like that... i can make the form which will do this, i just dont know the php variables for it, for instance $date or something like that...

any help on any subject would be well appreciated, and one more thing...

when i make the form, i can make a drop down box for the colors, blue red green black, and i can use those in the color.... i think im getting an idea of how to do it, would still like help :P

and yes, i like doing things in the most complicated of ways. i know :(

UPDATE i have made the form in html, linked it to the updater...

so i can get the changelog in the database, the columns are as follows, followed by an example

Number (Auto Increment Field also Key)
Name (Name of person whom added changelog entry)
Color (white green blue or red)
Message (Message contained in field)
Timestamp (default_Timestamp column...)

now all i need is a way to display this data in a php scripted page to select the data and color it accordingly....

so far all i have is a page that spews out name message timestamp.....

please help!

<table border="1"> <tr> <td>Date/Time<td>Name<td>Message</tr>

<?php
$con = mysql_connect("localhost","root","ascent");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("Ambience", $con);

$result = mysql_query("SELECT * FROM Changelog");

while($row = mysql_fetch_array($result))
  {
  
  echo '<tr><td> <font color="';
  echo $row['Color'];
  echo '">' ;
  echo $row['Timestamp'];
  echo '<td>';
  echo '<font color="';
  echo $row['Color'];
  echo '">' ;
  echo $row['Name'];
  echo '<td>';
  echo '<font color="';
  echo $row['Color'];
  echo '">' ;
  echo $row['Message'];
  echo '</font>';
  echo '</tr>';
  echo "<br />";
  }

mysql_close($con);
?>

WoW

lets just say that that took a lot of thinking...
the output of this can be seen on:

http://ambience.selfip.org/php_beta_changelog_viewer.php

The page will be updated from time to time...

you can do whatever you want with it, i put enough work into it, i want it to be spread out as far as i can get it :P

code 100% made by TimmCo.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.