cambiare colore al testo il float

  • Creatore Discussione Creatore Discussione Devja
  • Data di inizio Data di inizio

Devja

Utente Attivo
11 Gen 2013
38
0
6
PHP:
<?php  include "connect.php";?>
<!DOCTYPE html>
<!-- Website template by freewebsitetemplates.com -->
<head>
	<title>Products - Sporting Good</title>
	<meta charset="utf-8">
	<link href="css/style.css" rel="stylesheet" type="text/css">
	<!--[if IE 7]>
		<link href="css/ie7.css" rel="stylesheet" type="text/css">
	<![endif]-->
	
</head>
<body>
<form name="modulo" method="post" action="statistiche.php">
<input type="hidden" id="cosafare" name="cosafare" value ="0" />
	<div id="header">
		<div>
			<a href="index.html"><img class="logo" src="images/logo.png" width="477" height="220" alt=""> </a>
			<ul class="navigation">
				<li>
					<a href="index.html">Home</a>
				</li>
				<li>
					<a class="active" href="membri.html">Membri</a>
				</li>
				<li>
					<a href="about.html">About</a>
				</li>
				<li>
					<a href="blog.html">Blog</a>
				</li>
			</ul>
		</div>
	</div>
	<div id="body">
		<div>
			<div id="content">
<?php 
    //$query="SELECT Presenze, Goal, Rigori, Punizioni, Assist, Giocate, Gran_Goal, Pali,Interventi_Miracolosi,Autogoal,Rigori_Sbagliati, Rigori_Parati,Fallacci,Media_voto  FROM statistiche, name WHERE name.nome = '$name' AND name.id_nome = statistiche.id_nome";
    $server="localhost";
    $user="root";
    $pass="";
    $db_server = mysql_connect($server, $user, $pass);
    if (!$db_server) die("Unable to connect to MySQL: " . mysql_error());
    
    $database="calcetto";
    mysql_select_db($database) or die("Unable to select database: " . mysql_error());
    $n=$_POST["name"];
    
    $query="SELECT Presenze, Goal, Rigori, Punizioni, Assist, Giocate, Gran_Goal, Pali,Interventi_Miracolosi,Autogoal,Rigori_Sbagliati, Rigori_Parati,Fallacci,Media_voto  FROM statistiche, name WHERE name.nome = '$n' AND name.id_nome = statistiche.id_nome";
    $result=mysql_query($query);
    if (!$result) die ("Database access failed: " . mysql_error());
    $rows = mysql_num_rows($result);
    echo"<p align='center'>";
    echo"<font color='#FFFFFF'>";
    echo"<table border=1> ";
    echo"<tr>";
    echo"<td>Presenze</td>";
    echo"<td>Goal</td>";
    echo"<td>Rigori</td>";
    echo"<td>Punizioni</td>";
    echo"<td>Assist</td>";
    echo"<td>Giocate</td>";
    echo"<td>Gran Goal</td>";
    echo"<td>Pali</td>";
    echo"<td>Interventi Miracolosi</td>";
    echo"<td>Auotogoal</td>";
    echo"<td>Rigori</td>";
    echo"<td>Fallacci</td>";
    echo"<td>Media Voti</td>";
    echo"</tr>";
    echo"<tr>";
    for ($j = 0 ; $j < $rows ; $j++)
    {
        $row = mysql_fetch_assoc($result);
        echo"<td>".$row['Presenze']."</td>";
        echo"<td>".$row['Goal']."</td>";
        echo"<td>".$row['Rigori']."</td>";
        echo"<td>".$row['Punizioni']."</td>";
        echo"<td>".$row['Assist']."</td>";
        echo"<td>".$row['Giocate']."</td>";
        echo"<td>".$row['Gran_Goal']."</td>";
        echo"<td>".$row['Pali']."</td>";
        echo"<td>".$row['Interventi_Miracolisi']."</td>";
        echo"<td>".$row['Autogoal']."</td>";
        echo"<td>".$row['Rigori_Parati']."</td>";
        echo"<td>".$row['Fallacci']."</td>";
        echo"<td>".$row['Media_Voto']."</td>";	
    }
    echo"</tr>";
    echo"</table>";
    echo"</font>";
    echo"</p>";
    ?>

			</div>
		</div>
	</div>
	<div id="footer">
		<div>
			<div class="section">
				<div>
					<div>
						<ul>
							<li class="first">
								<h2>Blog</h2>
								<p>
									This is just a place holder, so you can see what the site would look like. <a href="blog.html" class="readmore">(more)</a>
								</p>
							</li>
							<li>
								<h2>get in touch</h2>
								<ul class="connect">
									<li>
										<a href="http://www.freewebsitetemplates.com/go/facebook/" class="facebook">&nbsp;</a>
									</li>
									<li>
										<a href="http://www.freewebsitetemplates.com/go/twitter/" class="twitter">&nbsp;</a>
									</li>
									<li>
										<a href="http://www.freewebsitetemplates.com/misc/contact" class="googleplus">&nbsp;</a>
									</li>
								</ul>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<div class="footnote">
				<p>
					&copy; Copyright 2012. All rights reserved.
				</p>
			</div>
		</div>
	</div>
</form> 	
</body>
</html>

Come posso cambiare colore del font alla tabella che stampo nell'echo?? e come mai non mi stampa un valore float dal db? grazie
 
Perché non modifichi il colore direttamente da CSS?
PHP:
table
{
border-collapse:collapse;
}
table,th, td
{
border: 1px solid black;
}
 

Discussioni simili