neilcg1 Posted April 10, 2009 Share Posted April 10, 2009 Hi I am new to PHP and trying to teach myself. I currently have a web site with a checkbox the code for this is: <td width="37" align="center"><input name="checkbox" type="checkbox" id="checkbox" value="checkbox" <?php if ($row[8]) echo "checked"; ?>> I am trying to replace the checkbox with a flashing arrow code thus: <td width="37" align="center"> <img border="0" <?php if ($row[8]) echo "src=\"arrow8.gif"\" ?> width="30" height="30">"; <?php if ($row[8]) echo "checked"; ?> <td width="53"> <div align="center"> <?php echo $row[10]?> </form> I get syntax error stating "," expected, which I can fix but the I get T LNUMBER error which is throwing me. ANy help greatly appreciated. Many Thanks Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/ Share on other sites More sharing options...
mmarif4u Posted April 10, 2009 Share Posted April 10, 2009 Please be more clear, where you get the error and use the code tags from the above menu while writing. Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806270 Share on other sites More sharing options...
laffin Posted April 10, 2009 Share Posted April 10, 2009 Learn to use ' single quotes and " double quotes u use " double quotes all over, yet still continue with the string. ' single quotes dun do $string processing within the quoted string " double quotes process $string variables within the string and also provide character substitution. it dusn look like u are processing any variables or special characters in yer echo's so replace the " double quotes to ' single quotes to mark the begin and end of yer string Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806272 Share on other sites More sharing options...
neilcg1 Posted April 10, 2009 Author Share Posted April 10, 2009 Hey Thanks for your help I will try replaceing " with ' Cheers Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806275 Share on other sites More sharing options...
neilcg1 Posted April 10, 2009 Author Share Posted April 10, 2009 Sorry Guys not getting anywhere, probably because I dont really know what I am doing. Perhaps if I explain a bit more fully. I have a web site: www.autobetpro.com/testtwo.php which has a checkbox which is unticked until the feed to the web site ticks the box. The code for this 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("******", "****", "****") // $sql_connect = @mysql_connect("*****", "*****", "******") 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© NHX Thailand. All rights reserved</span> </center> </body> </html> I want to replace the checkbox with a green flashing arrow and I have tried to do this with the following script below, but as you can see from the following url, the arrow appears where every checkbox is. I am trying to get it just to appear where the ticked checkboxes are in the first url above. www.autobetpro.com/livebets.php <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", "Neil", "graystoke") // $sql_connect = @mysql_connect("localhost:3306", "user", "webcore") 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© NHX Thailand. All rights reserved</span> </center> </center> </div> </body> </html> I have tried to replace the code section above that relates to the arrow with: <td width="37" align="center"> <img border="0" <?php if ($row[8]) echo "src=\"arrow8.gif"\" ?> width="30" height="30">"; <?php if ($row[8]) echo "checked"; ?> <td width="53"> <div align="center"> <?php echo $row[10]?> </form> But I am getting no where. I hope this explains my position more fully and any help really appreciated. Thank Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806284 Share on other sites More sharing options...
DeanWhitehouse Posted April 10, 2009 Share Posted April 10, 2009 Use code tags please Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806291 Share on other sites More sharing options...
Yesideez Posted April 10, 2009 Share Posted April 10, 2009 If you use [code] and [/code] tags you can helps us all as it preserves the formatting of your code and highlights it in different colors like this: <?php echo 'PHP source stands out'; ?> HTML stands out separately Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806299 Share on other sites More sharing options...
neilcg1 Posted April 10, 2009 Author Share Posted April 10, 2009 Hi Thousand apologies, I had no idea about code tags so I hope I have done this right. I have a web site: www.autobetpro.com/testtwo.php which has a checkbox which is unticked until the feed to the web site ticks the box. The code for this 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("*****", "*****", "*****") // $sql_connect = @mysql_connect("*****", "*****", "*****") 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] I want to replace the checkbox with a green flashing arrow and I have tried to do this with the following script below, but as you can see from the following url, the arrow appears where every checkbox is. I am trying to get it just to appear where the ticked checkboxes are in the first url above. www.autobetpro.com/livebets.php [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", "Neil", "graystoke") // $sql_connect = @mysql_connect("localhost:3306", "user", "webcore") 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 have tried to replace the code section above that relates to the arrow with: [code]<td width="37" align="center"> <img border="0" <?php if ($row[8]) echo "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] But I am getting no where. I hope this explains my position more fully and any help really appreciated. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806313 Share on other sites More sharing options...
Mark Baker Posted April 10, 2009 Share Posted April 10, 2009 Though you may want to replace the db connection details with asterisks or something rather than revealing the access details and password to anybody reading this thread Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806315 Share on other sites More sharing options...
neilcg1 Posted April 10, 2009 Author Share Posted April 10, 2009 Sorry Guys not getting anywhere, probably because I dont really know what I am doing. Perhaps if I explain a bit more fully. I have a web site: www.autobetpro.com/testtwo.php which has a checkbox which is unticked until the feed to the web site ticks the box. The code for this 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© NHX Thailand. All rights reserved</span> </center> </body> </html> I want to replace the checkbox with a green flashing arrow and I have tried to do this with the following script below, but as you can see from the following url, the arrow appears where every checkbox is. I am trying to get it just to appear where the ticked checkboxes are in the first url above. www.autobetpro.com/livebets.php <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© NHX Thailand. All rights reserved</span> </center> </center> </div> </body> </html> I have tried to replace the code section above that relates to the arrow with: <td width="37" align="center"> <img border="0" <?php if ($row[8]) echo "src=\"arrow8.gif"\" ?> width="30" height="30">"; <?php if ($row[8]) echo "checked"; ?> <td width="53"> <div align="center"> <?php echo $row[10]?> </form> But I am getting no where. I hope this explains my position more fully and any help really appreciated. Thank Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806323 Share on other sites More sharing options...
Yesideez Posted April 10, 2009 Share Posted April 10, 2009 Can you not edit your original post and remove the connection details from there? Then you can edit your "quoted" post and remove all the code Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806325 Share on other sites More sharing options...
neilcg1 Posted April 10, 2009 Author Share Posted April 10, 2009 Trying to find out how to edit posts hitting a blank? Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806327 Share on other sites More sharing options...
Yesideez Posted April 10, 2009 Share Posted April 10, 2009 "Modify" in the top-right of the actual post. Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806329 Share on other sites More sharing options...
neilcg1 Posted April 10, 2009 Author Share Posted April 10, 2009 I dont have modify? just quote Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806333 Share on other sites More sharing options...
Yesideez Posted April 10, 2009 Share Posted April 10, 2009 It does vanish after a specific amount of time. Do you want the arrow in place of the checkbox or next to it? Not quite sure of what it is exactly you want to achieve. Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806337 Share on other sites More sharing options...
neilcg1 Posted April 10, 2009 Author Share Posted April 10, 2009 Hi I guess its disapeared then. I need the arrow to replace the checkbox. Thanks for your help with this. Quote Link to comment https://forums.phpfreaks.com/topic/153462-solved-new-to-php-can-you-help-please/#findComment-806341 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.