Mam problem z wyświetlaniem danych pobranych z bazy.
Cały czas przesuwa mi wyniki w tabeli o jeden wiersz niżej.
Co zrobiłem źle?
Poniżej kod oraz screen.
<style type="text/css"> .done { -moz-box-shadow:inset 0px 1px 0px 0px #caefab; -webkit-box-shadow:inset 0px 1px 0px 0px #caefab; box-shadow:inset 0px 1px 0px 0px #caefab; background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #77d42a), color-stop(1, #5cb811) ); background:-moz-linear-gradient( center top, #77d42a 5%, #5cb811 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#77d42a', endColorstr='#5cb811'); background-color:#77d42a; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; border:1px solid #268a16; display:inline-block; color:#306108; font-family:arial; font-size:11px; font-weight:bold; padding:6px 24px; text-decoration:none; text-shadow:1px 1px 0px #aade7c; float:right; margin-right: 40px; }.done:hover { background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #5cb811), color-stop(1, #77d42a) ); background:-moz-linear-gradient( center top, #5cb811 5%, #77d42a 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5cb811', endColorstr='#77d42a'); background-color:#5cb811; }.done:active { position:relative; top:1px; } /* This imageless css button was generated by CSSButtonGenerator.com */ </style> <style type="text/css"> .todo { -moz-box-shadow:inset 0px 1px 0px 0px #f29c93; -webkit-box-shadow:inset 0px 1px 0px 0px #f29c93; box-shadow:inset 0px 1px 0px 0px #f29c93; background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #fe1a00), color-stop(1, #ce0100) ); background:-moz-linear-gradient( center top, #fe1a00 5%, #ce0100 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fe1a00', endColorstr='#ce0100'); background-color:#fe1a00; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; border:1px solid #d83526; display:inline-block; color:#ffffff; font-family:arial; font-size:11px; font-weight:bold; padding:6px 24px; text-decoration:none; text-shadow:1px 1px 0px #b23e35; float:right; margin-right: 40px; }.todo:hover { background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ce0100), color-stop(1, #fe1a00) ); background:-moz-linear-gradient( center top, #ce0100 5%, #fe1a00 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ce0100', endColorstr='#fe1a00'); background-color:#ce0100; }.todo:active { position:relative; top:1px; } /* This imageless css button was generated by CSSButtonGenerator.com */ </style> <table border="1" bordercolor="515151" style="padding: 10px; font-family: tahoma; font-size: 12px; width:100%;background-color:#e1e1e1" width="400" cellpadding="5" cellspacing="5"> <tr style="background-color: #a1a1a1"> <td ><strong>Data</strong></td> <td><strong>Handlowiec</strong></td> <td><strong>Zlecenie</strong></td> <td width="10%"><strong>Status</strong></td> </tr> <?php $host = "xxxl"; //host bazy danych $user = "xxx"; //nazwa użytkownika bazy danych $pass = "Sxxx"; //hasło użytkownika bazy danych $baza = "xxx"; //baza danych $polaczenie = mysql_connect($host, $user, $pass) or die("Błąd serwera bazy danych: " . mysql_error()); $imap = imap_open("{imap.xxxx:993/imap/ssl/novalidate-cert}INBOX", "xxxx", "xxxx"); $numMessages = imap_num_msg($imap); for ($i = $numMessages; $i > ($numMessages - 30); $i--) { $header = imap_header($imap, $i); $fromInfo = $header->from[0]; $replyInfo = $header->reply_to[0]; ? $fromInfo->mailbox . "@" . $fromInfo->host : "", ? $fromInfo->personal : "", ? $replyInfo->mailbox . "@" . $replyInfo->host : "", ? $replyto->personal : "", ? $header->subject : "", ? $header->date : "", ? $header->udate : "" ); $uid = imap_uid($imap, $i); $zapytanie = "SELECT * FROM `zlecenia` WHERE data='$data'"; if($row[4]==1){ } else{ } } $data = $details["date"]; else { mysql_query("insert into zlecenia values(null,'$details[date]','$details[fromAddr]','$details[subject]','0')"); } } echo "Wersja elektroniczna" ?>
