I am not sure if this is the correct forum to post this on.  If not, I apologize.  I am still pretty new to PHP.  I am editing a website for a friend.  He had a news headlines section on his home page, but wants to change it to a news bar that scrolls through the most recent news on their database.  I have been searching for help online for this and have felt like I was close, but never quite found what I needed (especially since I am new to this).  
I found this tutorial (http://www.dynamicdrive.com/dynamicindex2/crosstick.htm), which is what I want... except that I don't want to use an Array for the headlines, but I want it to pull from my database.  Is there an easy way for me to do this?  I already have a php file from the previous news headlines section, but am not sure how to get that to work with this new code.
Here is the code for the previous headlines...
Code: [Select]<div id="news"> 
<?php
getHeadlines();
/*
include("admin/nCMS/nSQL.php");
$db = new nSQL("local");
$q = "SELECT nDate, nTitle FROM `gtt_news` ORDER BY nDate DESC LIMIT 5;"
$r = $db->select($q);
while($data = $db->get_row()) {
   echo "<div class="newsitem">";
    echo "<p class="text"><a href="#">.$data['nTitle'].</a></p>";
   echo "</div>"; 
}
*/
?>
</div>
Please let me know if any other code is needed.
Thanks so much for your help.
preg_replace question
Hello!!I hope someone can help me with preg_replace.I load two tables from an external website, now I would like to highlight a complete tr (background color) if there is a td with a known string in
Simple Variable Question
Hi everyone.... again,I am really getting into php still. Learning more every day. I love it.But I have run into a problem I cannot solve.From what I understand, you can only "echo
split values
I have values that are returned to me in this format:name=>test,age=>49What I want to get out of this is an array like thisarray('name'=>'test','age'=>'49');I was hoping
How do i do multi uploads?.
Hey i would like to do this : http://hosting.mrkrabz.net/I've got the base down you can upload single files, But how would i make it so when you click a button it adds a new field for a file to be
retrieving more than one max key from an array?
so i have an array of 20 numerical values (0-100) that i need to order from highest to lowest and then i need to retrieve the keys of the top ten values. $array1 =
Dynamically set AccordianPane Header
I have an accordian on my master page. I'd like to be able to dynamically change the header on different pages. The I can't figure out how to do it or if it's even possible. When I access the
ok i need to join all this pages to make 1 neat code
i have 5 pages that make up my tv guide it works 100% but i want to make it 1 page if i can or 2, i want it to have diff pages for each guide but all the code on 1 page i just dont know how to do it,
curl javascript problem
Hi Experts.I'm new curl and wanna to get some info from this http://www.amadeus.net/when user enter some city name,the page suggest a list and then user select one of them.then user click a button and
Limiting checkboxes?
Hi guys, I have this code: Code: if(isset($_POST['selected'])) { foreach($_POST['selected'] as $item) { $sql = "SELECT * FROM tablename WHERE ID=$item"; mysql_query($sql) or
How to add functionality to a simple php calender?
Hello everyone, I have just finished creating a simple php calander. Can someone point me into the right direction as to what I need to do to begin to give the calender functionality?For exampleI