PHP - Mouse Over In Php
i want to put a mouse over in php tags
<?php echo" <table> <TD onMouseOver="this.bgColor='#00CC00'" onMouseOut="this.bgColor='#009900'" bgColor=#009900><tr> "; ?> but i get confused with the " and ' where i should/shouldnt use them ................ Similar TutorialsBasically I have a page which returns data from a SQL database. Column results have a mouseover javascript which pops up a message when hovered. I highlighted the code which gives me problem. What i want to do here is that when a the sql query for the field errorMessage has no value, it returns a popup (which functions properly so far), but returns the content of the field errorMessage if it has value in the database. Here's my code : <?php $conn = mysql_connect("localhost", "root", "123456") or die(mysql_error()); mysql_select_db("test") or die(mysql_error()); $sql = mysql_query("SELECT * FROM buccaneer ORDER BY portNumber ASC") or die(mysql_error()); if(mysql_num_rows($sql) == 0) { echo "<center><b>No ORDER/S in Queue</b></center>"; } else { while($result = mysql_fetch_array($sql)) { echo"<tr><td class='tableContent'>".$result['portNumber']."</td>"; echo"<td class='tableContentDate'>".$result['dueDate']."</td>"; echo"<td class='tableContent'><span onmouseover=\"tooltip.show('Click to search ".$result['workObject']." at Shop Floor');\" onmouseout=\"tooltip.hide();\"><a href='http://*******?object=".$result['workObject']."&search=Overview'>".$result['workObject']."</a></span></td>"; echo"<td class='tableContent'><span onmouseover=\"tooltip.show('Click to search ".$result['salesOrder']." at Shop Floor');\" onmouseout=\"tooltip.hide();\"><a href='http://*******?object=".$result['salesOrder']."&search=Overview'>".$result['salesOrder']."</a></span></td>"; echo"<td class='tableContent'>".$result['systemStatus']."</td>"; if ($result['errorMessage'] = "") { echo"<td class='tableContent'><span onmouseover=\"tooltip.show('Click to add Error Message to ".$result['workObject']."');\" onmouseout=\"tooltip.hide();\"><a href='addRemarks.php'>".$result['systemRemarks']."</a></span></td>"; } else { echo"<td class='tableContent'><span onmouseover=\"tooltip.show('".$result['errorMessage']."');\" onmouseout=\"tooltip.hide();\">".$result['systemRemarks']."</a></span></td>"; } echo"<td class='tableContent'>".$result['orderType']."</td>"; echo"<td class='tableContent' id='customerName' name='customerName'>".$result['customerName']."</td>"; echo"</tr>"; }} ?> Please help as this is my project. I'm still a newbie in PHP and I have been coding for a few months only. Thanks! I have been working with PHP & CSS for a few months, and want to develop a drop-down menu that appears when mousing over a list item. The menu would display the contents of a MySQL query. What is the easiest way to do this? Could you provide sample code? And, is JavaSript absolutely necessary? Thanks. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=320488.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=350544.0 |