May 16, 2016
How to Use Marquee tag in html with PHP & MySQLi

Hi, friends now we are going to learn how to use the marquee tag in HTML with PHP & MySQL. In web page marquee tag is used to display scrolling text from left to right and up to down direction. With the help of PHP & Mysql database, we are going to scroll dynamic text using the marquee tag.
index.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
<?php $conn = mysqli_connect("localhost", "root", "", "test") or die(mysqli_error()); $sql = "SELECT * FROM empinfo ORDER BY id LIMIT 6"; $result = mysqli_query($conn, $sql); ?> <!doctype html> <html> <head> <title>Marquee Link in PHP | SoftAOX</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.js"></script> </head> <body> <div style="width:400px; border:1px solid #0CC"> <marquee behavior="scroll" direction="down" onMouseOver="this.stop();" onMouseOut="this.start();"> <?php if(mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_array($result)) { echo '<label><a href="'.$row['link'].'" target="_blank" rel="noopener noreferrer">'.$row['name'].'</a></label><br/>'; } } ?> </marquee> </div> </body> </html> |
Download
Mraj
Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts. If you have any questions let me drop an email with the article name to the following email id: [email protected]