Jump to content

[SOLVED] <TR mouseover....


Recommended Posts

Hi there..

This managed to work fine in html but now that I have put it in a php file it does not work.

Supposed to change cell's color onmouseover but not doing anything..

here is the code

 

<style type='text/css'>
tr.off {
background: #CCCCCC;
}

tr.on {
background: #FF0000;
}

</style>

<table width='533' height='21' border='0' align='center' cellpadding='0' cellspacing='1' bordercolor='#000000' bgcolor='#FF0000'>
  <tr>
    <td width='100'><div align='center'><span class='style5'>Name</span></div></td>
    <td width='200'><div align='center'><span class='style5'>Reson</span></div></td>
    <td width='80'><div align='center'><span class='style5'>Status</span></div></td>
    <td width='120'><div align='center'><span class='style5'>E-mail</span></div></td>
<td width='120'><div align='center'><span class='style5'>**</span></div></td>
    <td width='60'><div align='center'><span class='style5'>**</span></div></td>
    <td width='80'><div align='center'><span class='style5'>**</span></div></td>
  </tr><tr class='off' onmouseover='this.className='on'' onmouseout='this.className='off''>

Link to comment
https://forums.phpfreaks.com/topic/43831-solved/
Share on other sites

<?php
session_start();
require "connect.php";
$by         = "sid";
$ord        = ($_GET['ord']);
$cnt        = mysql_query("SELECT sid FROM spammers");
$membs      = mysql_num_rows($cnt);
$pages      = (int)($membs / 100) + 1;

if ($membs % 100 == 0)
{
$pages--;
}

print "<title>{$_SERVER['SCRIPT_NAME']}</title>
<style type='text/css'>
.style5 {color: #000000; font-weight: bold; font-family: Arial; }
body {
background-color: #000000;
background-image: url();
}

tr.off {
background: #CCCCCC;
}

tr.on {
background: #FF0000;
}

</style><p align='center'><img src='lgo.png' alt='loading..' width='600' height='200' /></p>";
print "<center><font color=white>Pages:</font> ";

for ($i = 1; $i <= $pages; $i++)
{
$stl = ($i - 1) * 100;
print "<a href='index.php?st=$stl&by=$by&ord=$ord'>$i</a> ";
}

print "<br />
<center><font color=white>Order By: <a href='index.php?by=username&ord=$ord'>Username</a><br>
<a href='index.php?ord=asc'>Ascending</a> | <a href='index.php?ord=desc'>Descending</a><br /><br />";
$sm=mysql_query("SELECT * FROM spammers ORDER BY $by $ord LIMIT 100");
$no1 = $st + 1;
$no2 = $st + 100;
print "<font color=white>Showing $no1 to $no2 by order of $by $ord.
<table width='533' height='21' border='0' align='center' cellpadding='0' cellspacing='1' bordercolor='#000000' bgcolor='#FF0000'>
  <tr>
    <td width='100'><div align='center'><span class='style5'>Name</span></div></td>
    <td width='200'><div align='center'><span class='style5'>Reson</span></div></td>
    <td width='80'><div align='center'><span class='style5'>Status</span></div></td>
    <td width='120'><div align='center'><span class='style5'>E-mail</span></div></td>
<td width='120'><div align='center'><span class='style5'>IP</span></div></td>
    <td width='60'><div align='center'><span class='style5'>Date</span></div></td>
    <td width='80'><div align='center'><span class='style5'>Links</span></div></td>
  </tr>";

while ($s=mysql_fetch_array($sm))
{
print
     "<tr class='off' onmouseover='this.className='on'' onmouseout='this.className='off''>
    <td>".$s['name']."</td>
    <td>".$s['reson']."</td>";
if ($s['status'] == 0){
print "<td bgcolor=white>None</td>";}
elseif ($s['status'] == 1){
print "<td bgcolor=yellow>Abuser</td>";}
elseif ($s['status'] == 2){
print "<td bgcolor=orange>Beware</td>";}
elseif ($s['status'] == 3){
print "<td bgcolor=red>Ban</td>";}
    echo "<td>".$s['email']."</td>
    <td>".$s['ip']."</td>
    <td>".$s['date']."</td>
<td><a href='http://www.google.com/search?q={$s['name']}' target='_new'>Google</a></td>
  </tr>";
}

print "</table>";

?>

Link to comment
https://forums.phpfreaks.com/topic/43831-solved/#findComment-212772
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.