| | |
PHP based Changelog [need help]
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2008
Posts: 112
Reputation:
Solved Threads: 4
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
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
<<TimmCo>> Custom Computers
~Executive
•
•
Join Date: May 2008
Posts: 112
Reputation:
Solved Threads: 4
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!
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
<<TimmCo>> Custom Computers
~Executive
•
•
Join Date: May 2008
Posts: 112
Reputation:
Solved Threads: 4
PHP Syntax (Toggle Plain Text)
<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_...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
<<TimmCo>> Custom Computers
~Executive
![]() |
Similar Threads
- Open In New Window Php (PHP)
Other Threads in the PHP Forum
- Previous Thread: session questions
- Next Thread: quiz software
| Thread Tools | Search this Thread |
action address advanced ajax apache api array auto autoincrement basics beginner broken cakephp class cms code codingproblem combobox cron curl database date datepart display domain dynamic email error errorlog file folder form format forms function functions google head href htaccess html image include includingmysecondfileinthechain interactive ip javascript job joomla js limit link load login malfunctioning masterthesis menu multiple mysql nodes oop outofmemmory paging password paypal pdf php popup problem procedure query ram random reference script search server sessions smarty source space sql stored syntax system table traffic tutorial unicode unset up-to-date upload url validation variable video web webapplications websitecontactform youtube





