PHP based Changelog [need help]

Reply

Join Date: May 2008
Posts: 113
Reputation: Merlin33069 is an unknown quantity at this point 
Solved Threads: 4
Merlin33069 Merlin33069 is offline Offline
Junior Poster

PHP based Changelog [need help]

 
0
  #1
Mar 8th, 2009
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

and yes, i like doing things in the most complicated of ways. i know
Do you geek alone?

<<TimmCo>> Custom Computers

~Executive
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 113
Reputation: Merlin33069 is an unknown quantity at this point 
Solved Threads: 4
Merlin33069 Merlin33069 is offline Offline
Junior Poster

Re: PHP based Changelog [need help]

 
0
  #2
Mar 8th, 2009
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!
Do you geek alone?

<<TimmCo>> Custom Computers

~Executive
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 113
Reputation: Merlin33069 is an unknown quantity at this point 
Solved Threads: 4
Merlin33069 Merlin33069 is offline Offline
Junior Poster

Re: PHP based Changelog [need help]

 
0
  #3
Mar 9th, 2009
  1. <table border="1"> <tr> <td>Date/Time<td>Name<td>Message</tr>
  2.  
  3. <?php
  4. $con = mysql_connect("localhost","root","ascent");
  5. if (!$con)
  6. {
  7. die('Could not connect: ' . mysql_error());
  8. }
  9.  
  10. mysql_select_db("Ambience", $con);
  11.  
  12. $result = mysql_query("SELECT * FROM Changelog");
  13.  
  14. while($row = mysql_fetch_array($result))
  15. {
  16.  
  17. echo '<tr><td> <font color="';
  18. echo $row['Color'];
  19. echo '">' ;
  20. echo $row['Timestamp'];
  21. echo '<td>';
  22. echo '<font color="';
  23. echo $row['Color'];
  24. echo '">' ;
  25. echo $row['Name'];
  26. echo '<td>';
  27. echo '<font color="';
  28. echo $row['Color'];
  29. echo '">' ;
  30. echo $row['Message'];
  31. echo '</font>';
  32. echo '</tr>';
  33. echo "<br />";
  34. }
  35.  
  36. mysql_close($con);
  37. ?>

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_...log_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

code 100% made by TimmCo.
Do you geek alone?

<<TimmCo>> Custom Computers

~Executive
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC