neilcg1 Posted April 10, 2009 Share Posted April 10, 2009 Hi All Sorry all not used to how forum worked so had to close my earlier thread as I had left in some details I should have ***** out so I will try again please. I am very very new to all this. I have a web site which is a database fed from a software application which updates instantly from the application (as I understand it from the person who built it for me) Currently the web site has a column of checkboxes, as feed comes through one of the checkboxes will occassionally contain a green tick. I want to replace the checkboxes so that instead of a small green tick I have a flashing green arrow. So far I have managed to replace the checkboxes with the flashing green arrow. The problem is I need the flashing green arrow to replace the checkboxes with a green tick only not ALL of them as it is doing now. It might help more with the urls for the web sites. Original web site with checkboxes: http://www.autobetpro.com/testtwo.php Web site I have managed to get flashing arrows on: http://www.autobetpro.com/livebets.php Code for 1st web site is: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>TML Nano Runners</title> <style type="text/css"> </style> <link href="../NHX/CSS/Level1_Verdana.css" rel="stylesheet" type="text/css"> <link href="../NHX/CSS/scb.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style28 {font-size: xx-small} --> </style> </head> <body> <?php $sql_connect = @mysql_connect("213.232.95.7:3306", *************) // $sql_connect = @mysql_connect("localhost:3306", ***************) or die('Could not connect: ' . mysql_error()); mysql_select_db("tml"); $qry = "select distinct r2.name, r.selectionId, m.marketId, v.name, DATE_FORMAT(m.start_time_gmt + INTERVAL 0 SECOND, '%H:%i'), r.ID, r.lay10, r.lay1, r.layed, r.percentage, r2.finishing_position from tml.runners r join capture.markets m on (m.marketId = r.marketId) join venues.venues v on (v.id = m.venue) join capture.runners r2 on (r2.selectionid = r.selectionid AND r.marketid = r2.marketid) where to_days(m.start_time_gmt) = to_days(utc_date) - if(HOUR(UTC_TIMESTAMP) < 13, 1, 0) order by m.start_time_gmt"; //if(HOUR(UTC_TIMESTAMP) < 14, 1, 0) order by m.start_time_gmt"; //echo $qry; $rs = mysql_query($qry, $sql_connect); $heading = "TML Runners"; ?> <div align="center"><span class="Heading"><?php echo $heading?></span></div> <hr> <table width="500" height="20" border=1 align="center" cellpadding=1 cellspacing=0 bordercolor="#777777" bordercolordark="#ffffff" bgcolor="#FFFFCC" class="data_tbl"> <tr> <th width="41" bgcolor="#C0C0C0"><div align="center"><span class="style5">Start</span></div></th> <th width="102" bgcolor="#C0C0C0"><span class="style5">Venue</span></th> <th width="111" bgcolor="#C0C0C0"><span class="style5">Runner</span></th> <th width="56" bgcolor="#C0C0C0"><span class="style5">10 Min</span></th> <th width="70" bgcolor="#C0C0C0"><span class="style5">1 Min</span></th> <th width="53" bgcolor="#C0C0C0"><span class="style5">%age</span></th> <th width="37" bgcolor="#C0C0C0"><span class="style5">Lay</span></th> <th width="37" bgcolor="#C0C0C0"><span class="style5">Finished</span></th> </tr> <col width="10"> <?php $cnt = 1; while($row = mysql_fetch_array($rs)) { ?> <tr class="small_tbl"> <form action="" method="post" name="form1"> </form> <td width="41"><?php echo $row[4]?> <td width="102"><?php echo $row[3]?> <td width="111"><div align="center"><?php echo $row[0]?> <td width="56"><div align="center"><?php echo $row[6]?> </div> <td width="70"><div align="center"><?php echo $row[7]?> </div> <label for="checkbox"></label> <div align="center"> <input type="hidden" name="ID" value="<?php echo $row[5]; ?>" /> <input type="hidden" name="marketId" value="<?php echo $row[2]; ?>" /> <input type="hidden" name="selectionId" value="<?php echo $row[1]; ?>" /> </div> <td width="53"><div align="center"><?php echo $row[9]?> <td width="37" align="center"><input name="checkbox" type="checkbox" id="checkbox" value="checkbox" <?php if ($row[8]) echo "checked"; ?>> <td width="53"><div align="center"><?php echo $row[10]?> </form> </tr> <?php $cnt += 1; } mysql_free_result($rs); mysql_close($sql_connect); ?> </table> <hr> <center> <span class="footer">Copyright(C) NHX Thailand. All rights reserved</span> </center> </body> </html>/code] The code for the 2nd web site is: [code]<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>AUTOBETPRO LIVE BETS</title> <style type="text/css"> </style> <link href="unsaved:///../NHX/CSS/Level1_Verdana.css" rel="stylesheet" type="text/css"> <link href="unsaved:///../NHX/CSS/scb.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style28 {font-size: xx-small} --> </style> </head> <body bgcolor="#E0E0E0"> <?php $sql_connect = @mysql_connect("213.232.95.7:3306", ***********) // $sql_connect = @mysql_connect("localhost:3306", ***************) or die('Could not connect: ' . mysql_error()); mysql_select_db("tml"); $qry = "select distinct r2.name, r.selectionId, m.marketId, v.name, DATE_FORMAT(m.start_time_gmt + INTERVAL 0 SECOND, '%H:%i'), r.ID, r.lay10, r.lay1, r.layed, r.percentage, r2.finishing_position from tml.runners r join capture.markets m on (m.marketId = r.marketId) join venues.venues v on (v.id = m.venue) join capture.runners r2 on (r2.selectionid = r.selectionid AND r.marketid = r2.marketid) where to_days(m.start_time_gmt) = to_days(utc_date) - if(HOUR(UTC_TIMESTAMP) < 13, 1, 0) order by m.start_time_gmt"; //if(HOUR(UTC_TIMESTAMP) < 14, 1, 0) order by m.start_time_gmt"; //echo $qry; $rs = mysql_query($qry, $sql_connect); $heading = ""; ?> <div align="center"><span class="Heading"><?php echo $heading?><script type="text/javascript" src="http://www.freeflashheaders.com/resources/swfobject.js"></script> <div id="freeflashheader" align="center"> <div id="noUpdate"> <p>The content presented here requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by <a href="http://www.macromedia.com/go/getflashplayer">downloading here</a>. </p> </div> </div> <script type="text/javascript"> var so = new SWFObject("http://www.freeflashheaders.com/resources/displayHeader.swf", "FFHDisplayHeader", "700", "150", "9", "#ffffff"); so.addParam("scale", "exactfit"); so.addVariable("id", "9426"); so.addVariable("header", "1"); so.write("freeflashheader"); </script> </span></div> <p align="center"><b><font color="#FF0000" face="Tahoma" size="5">Live Bets</font></b></p> <div align="center"> <center> <table width="700" height="20" border=1 cellpadding=0 cellspacing=0 bordercolor="#777777" bordercolordark="#FFFFFF" bgcolor="#FFE493" class="data_tbl" style="border-collapse: collapse"> <tr> <th width="80" bgcolor="#C0C0C0" nowrap><div align="center"> <span class="style5">Race Time</span></div></th> <th width="102" bgcolor="#C0C0C0"><span class="style5">Race Course</span></th> <th width="150" bgcolor="#C0C0C0"><span class="style5">Horse</span></th> <th width="150" bgcolor="#C0C0C0" nowrap><span class="style5">Lay Bet </span></th> <th width="37" bgcolor="#C0C0C0"><span class="style5">Finishing Position</span></th> </tr> <col width="10"> <?php $cnt = 1; while($row = mysql_fetch_array($rs)) { ?> <tr class="small_tbl"> <form action="" method="post" name="form1"> </form> <td width="41"><?php echo $row[4]?> <td width="102"><?php echo $row[3]?> <td width="111"><div align="center"><?php echo $row[0]?> </div> </div> <div align="center"> <input type="hidden" name="ID" value="<?php echo $row[5]; ?>" /> <input type="hidden" name="marketId" value="<?php echo $row[2]; ?>" /> <input type="hidden" name="selectionId" value="<?php echo $row[1]; ?>" /> </div> <td width="37" align="center"> <img border='0' src='arrow8.gif' width='36' height='36'> <?php if ($row[8]) echo "checked"; ?> <td width="53"><div align="center"><?php echo $row[10]?> </form> </tr> <?php $cnt += 1; } mysql_free_result($rs); mysql_close($sql_connect); ?> </table> <hr> <center> <span class="footer">Copyright(C) NHX Thailand. All rights reserved</span> </center> </center> </div> </body> </html>/code] I was kindly give this code to try in place of the checkbox code but I am unable to get it to work: [code]<td width="37" align="center"> <?php if ($row[8]) echo"<img border="0" src="arrow8.gif" width="30" height="30">"; ?> <?php if ($row[8]) echo "checked"; ?> <td width="53"><div align="center"><?php echo $row[10]?> </form> /code] Any help/ideas would be greatly appreciated. Many Thanks Link to comment https://forums.phpfreaks.com/topic/153563-newbie-needs-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.