Marquee style scroll using in different manner, such as top to bottom, bottom to top, left to right, right to left, and scroll speed control, like all those details we are going to discuss here. usually all web developer must this tag that is marquee tag, which this marquee tag is used for the purpose of make the small kind of head line or make important thing in the particular area using marquee scroll style, similarly here we are going to discuss the thing about marquee tag with Php and Mysql.

marquee tag is used for more purpose, like top news publishing with marquee scrolling and more frequently publishing news or some other all things are scroll in a particular area, for that here we are using the marquee tag.
STOP / START
Marquee start and stop is the one main function most of us searching this thing, how is it happens on mouse hover. see the code.
<marquee behavior="scroll" onmouseover="this.stop();" onmouseout="this.start();"> </marquee>
onmouseover="this.stop();" for stop the marquee content on on mouse over, onmouseout="this.start();" for start the marquee tag content on mouse out.
MARQUEE DIRECTION
Marquee direction is for make the marquee move direction, the moving of marquee tag is move towards to which direction, like left to right, or right to left like that. for that we are using that marquee direction tag. see the code.
<marquee behavior="scroll" direction="right/left/up/down" onmouseover="this.stop();" onmouseout="this.start();"> </marquee>
choose any one direction in the above direction like left or right or up or down any one direction.
MARQUEE SPEED
Marquee speed how reduce and increase the speed of marquee tag moving. see the code.
<marquee behavior="scroll" scrollamount="5" direction="right" onmouseover="this.stop();" onmouseout="this.start();"> </marquee>
that is scrollamount="5" we can give any number value for that, when you increase the value of scrollamount the speed will be increased, when you are reducing the scrollamount the speed will be decreased.
PHP and Mysql FETCH FROM DATABASE
<?php $con=mysql_connect('localhost','root',''); $db=mysql_select_db('2my4edge',$con); ?>
Database name --> 2my4edge
table name --> marquee
column names --> id, feeds
<div class="main"> <?php $fetch=mysql_query("select * from marquee limit 5"); if(mysql_num_rows($fetch)) { ?> <marquee behavior="scroll" scrollamount="2" direction="up" onmouseover="this.stop();" onmouseout="this.start();"> <ul class="ulclass" > <?php while($row=mysql_fetch_array($fetch)) { $id=$row['id']; $feed=$row['feeds']; ?> <li class="liclass"> <?php echo $feed; ?> <?php } ?> </li> <?php } ?> </ul> </marquee> </div>
you can clear with the above coding, just fetch data from the database, which is from marquee table, * astrick is for select all the field from the table name. and make the coding with simple.
RELATED POSTS:
Export the MySQL database table as CSV format using PHP
Simple Pagination with loading effect using Qjuery, PHP and MySql
File download coding using PHP and Mysql
Simple Login logout system using php
Username live availability Check using php and Ajax
Comment System using PHP and MySql
Create Database with MySql and INSERT coding in php
RELATED POSTS:
Export the MySQL database table as CSV format using PHP
Simple Pagination with loading effect using Qjuery, PHP and MySql
File download coding using PHP and Mysql
Simple Login logout system using php
Username live availability Check using php and Ajax
Comment System using PHP and MySql
Create Database with MySql and INSERT coding in php
Nice!! Thank you very much!!
ReplyDeleteDude your like century away :D
ReplyDeleteMany Many Thanks to you. It was wanted by me from many days ago. Really I become very happy to get it. May Allah bless You.
ReplyDeleteThanks and keep up the good work visit: http://www.dreamdestinations.in/
ReplyDeleteThank U Very Much Dude!!! You Deserve A Salute!
ReplyDeleteSuperrrrrrrrrrrrr
ReplyDeletethese tag not run Mozilla browser
ReplyDeleteSo nice thank you.
ReplyDeleteA very very thank you .....for providindg best solution.........All the best for entire team
ReplyDeleteHelpful..
ReplyDeleteHow can I correct this error : Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\xampp\htdocs\projects\allsaints\marquee\db.php on line 2
ReplyDeleteThank You .....
ReplyDeleteIts working.......
Tysm..........
how can i move text on image????
ReplyDelete