

kod PHP:
<? /* MySQL details */ $dbHost = "sql.baza.pl"; $dbUser = "user"; $dbPass = "pass"; $dbName = "baza"; $table = "downloadLog"; /* Attempt connection to MySQL server */ /* If connection wasn't successful... */ if (!$link) { /* Return error information to Flash and quit! */ exit; } /* Attempt to select our database */ /* If not able to select... */ /* Return error information to Flash and quit! */ exit; } /* Fetch current time from server */ /* Build SQL query to insert our information into table */ $query = "INSERT INTO $table (tresc, nadawca, entryDate) "; $query .= "VALUES('$tresc', '$nadawca', $currentTime)"; /* Execute query */ /* If there was an error executing query... */ if (!$result) { /* Return error information to Flash and quit! */ exit; } /* Build SQL query to fetch all entries from the table */ $query = "SELECT * FROM $table ORDER BY entryDate DESC"; /* Execute query */ /* If there was a problem with the query... */ /* Return error information to Flash and quit! */ exit; } /* Reset variable to hold output */ $news = ""; /* For each table entry returned... */ /* Create human readable date from timestamp */ /* Add details to output variable */ $news .= "<p class='style1'><b>Data:</b> " . $entryDate . "<br></p>"; $news .= "<p class='style2'><b>Nadawca:</b> " . $row['nadawca'] . "<br></p>"; $news .= "<p class='style3'><b>Tresc:</b> " . $row['tresc'] . "<br></p>"; } /* Output data in required format */ /* Close link to MySQL */ ?>
Mam nadzieje ,że mi pomożecie ...
Pozdrawiam