All cookies to which the server has access (not all cookies that are stored in the browser!) are available in the superglobal array $_COOKIE. The foreach loop reads in all cookies and sends them to the client in an HTML table. Reading Out Cookie (getcookie.php)<table> <?php foreach ($_COOKIE as $name => $value) { printf('<tr><td>%s</td><td>%s</td></tr>', htmlspecialchars($name), htmlspecialchars($value)); } ?> </table>
|