October 22, 200619 yr Hi all,i wanna to make newsbar that move automatically and the informattion on it don't linked (i.e. can't click on it to go to link) just wanna news.HOw i can do this?Regards,Xtremee
October 25, 200619 yr Author I don't think that is really depend on where are you getting the news from?But any way i will use it for My Radio StationHope that you can help!Regards,Xtremee
October 30, 200619 yr If you just want to add the news to your html source files your can use this:<marquee>This is news item 1 ** This is news item 2 ** This is news item3</marquee>If you want to show news from items in a database you first have to connect to the database and fetch the items from the database. Using PHP and MySQL it would be something like this:mysqlconnection.php:<?phpfunction MySQL_connection() { $host = "hostname"; $user = "username"; $pass = "password"; $connection = mysql_connect($host, $user, $pass); mysql_select_db ("databasename", $connection); }?>newsbar.php<?phpinclude("mysqlconnection.php"); MySQL_connection();$qsqlnews = mysql_query("SELECT * FROM news");While($row = @mysql_fetch_array($qsqlnews)) { $title = $row["title"]; $message = $row["message"]; $date = $row["date"]; } echo "<marquee><b>($date) $title</b> - $message ";?>Edit:Ofcourse you have to edit $host, $user, $pass and databasename according to your situation Edited October 31, 200619 yr by Darude1234
October 31, 200619 yr Author Hi all,i wanna to get Automatic upgating news bar that i can use to put it in my website. i don't wanna to make this new bar my self using marquee That is allany idea will be excellent.Regards,Xtremee
October 31, 200619 yr Why did you open a new topic? What was wrong with my solution?If you want to show news from items in a database you first have to connect to the database and fetch the items from the database. Using PHP and MySQL it would be something like this:mysqlconnection.php:<?phpfunction MySQL_connection() { $host = "hostname"; $user = "username"; $pass = "password"; $connection = mysql_connect($host, $user, $pass); mysql_select_db ("databasename", $connection); }?>newsbar.php<?phpinclude("mysqlconnection.php"); MySQL_connection();$qsqlnews = mysql_query("SELECT * FROM news");While($row = @mysql_fetch_array($qsqlnews)) { $title = $row["title"]; $message = $row["message"]; $date = $row["date"]; } echo "<marquee><b>($date) $title</b> - $message ";?>Ofcourse you have to edit $host, $user, $pass and databasename according to your situation Edited October 31, 200619 yr by Darude1234
October 31, 200619 yr Topics Merged@xtremee - Please don't start a new topic if you've already got one. Your previous thread seemed to solve your problem. Reply there if you want more information.
November 3, 200619 yr i don't wanna to make this new bar my self using marquee That is allRemove the marquee quotes <marquee> and </marquee> Try to tell exactly what you want. I think there are 3 options and I showed you these options:Option 1. Put the news directly in the source codeOption 2. Getting the news from a database and show it to the userOption 3. Put news lines, line by line in a text file and read every line in the text file using a script.But the last option is almost the same as option 1.
November 3, 200619 yr Author @Darude1234,1st thanks for your reply,i wanna the new to be set automatically in my page without going to add them my self.-> Option 1& 3 not my requireRegards,Xtremee
November 4, 200619 yr So you're basically asking for a new bars that gets news from RSS news feeds? Just trying to help clarify what you want - I have no experience in dealing with RSS. Edited November 4, 200619 yr by Chozo4
November 8, 200619 yr Author @Chozo4,1st thanks for ur reolyi don't wanna RSS newsi wanna a news bar which show the last news and update its contain automatically without modify its marquee every new news
November 10, 200619 yr @Chozo4,1st thanks for ur reolyi don't wanna RSS newsi wanna a news bar which show the last news and update its contain automatically without modify its marquee every new newsWell, in that case, what's wrong with my solution in post #7?I still don't know what you want. If you want to change the contents automatically, try to understand that you need a source to get the news from like a database or text file, can't find another solution right now
December 25, 200619 yr not sure if that is what you are looking for but ever tried Cute News? It does not use SQLs, the data is stored in flat files.
January 28, 200719 yr Author HiThanks for all who try to helpi wanna newsbar like this one in the top of http://www.soft32.comi check the source of the page and i don't think that it is marquee. I think they use some java scripts!!if it java can any one tell me what is the script that i need?Thanks in advanceRegards,Xtremee
Create an account or sign in to comment