Jump to content

table problem :S


UnknownPlayer

Recommended Posts

I have problem with table in my page :S

First problem with this code:

<?php
                                        $query = "SELECT * FROM prijave ORDER BY date ASC";
				$result = mysql_query($query, $connection);
				$i = 0;
				while ($prijava = mysql_fetch_array($result)) {
					$i++;
					if ($i % 2) {
						$bgcolor = "#EEEEEE";
					} else {
						$bgcolor = "#E0E0E0";
					}
					$date = $prijava['date'];
					$show_date = date("H:i:s m/d/Y", $date);
					echo '
					  <tr>
						<td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'">
						  <font face="Arial" size="2">
							  '.$prijava['ime'].'
						  </font>
						</td>
						<td  width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'">
						  <font face="Arial" size="2">
							  '.$prijava['prezime'].'
						  </font>
						</td>
						<td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'">
						  <font face="Arial" size="2">
							  '.$prijava['ispit'].'
						  </font>
						</td>
						<td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'">
						  <font face="Arial" size="2">
							  '.$show_date.'
						  </font>
						</td>
					  </tr>
					';
				}
?>

.. there is a picture of this problem:

15d2reo.jpg

 

And second option, i mean same thing but problem in tds :S

<?php
				$query = "SELECT * FROM prijave ORDER BY date ASC";
				$result = mysql_query($query, $connection);
				$i = 0;
				while ($prijava = mysql_fetch_array($result)) {
					$i++;
					if ($i % 2) {
						$bgcolor = "#EEEEEE";
					} else {
						$bgcolor = "#E0E0E0";
					}
					$date = $prijava['date'];
					$show_date = date("H:i:s m/d/Y", $date);
					echo '
					<table border="1px" width="70%">
					  <tr>
						<td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'">
						  <font face="Arial" size="2">
							  '.$prijava['ime'].'
						  </font>
						</td>
						<td  width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'">
						  <font face="Arial" size="2">
							  '.$prijava['prezime'].'
						  </font>
						</td>
						<td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'">
						  <font face="Arial" size="2">
							  '.$prijava['ispit'].'
						  </font>
						</td>
						<td width="1%" valign="top" nowrap bgcolor="'.$bgcolor.'">
						  <font face="Arial" size="2">
							  '.$show_date.'
						  </font>
						</td>
					  </tr>
					</table>
					';
				}
?>

Picture:

x6km7k.jpg

Link to comment
https://forums.phpfreaks.com/topic/198956-table-problem-s/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.