Thanks to everybody who attempted to help. I got help from another site which gave this:
- Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-us">
<head>
<title>Testing!</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<?php
$print=$_GET["print];
if($print=="true")
{
echo "<link rel='stylesheet' type='text/css' href='print.css'>";
}
else
{
echo "<link rel='stylesheet' type='text/css' href='normal.css'>";
}
?>
</head>
<body>
<form action="test.php" method="GET">
<input type="hidden" name="print" id="print" value="true">
<input type="submit" value="Printable version">
</form>
Hello!
</p>
</body>
</html>
Simple? Yes, but I wanted more! Rather than a button which only linked to a printable version, I wanted to use a link back! Dropdowns work:
- Code: Select all
<form action="test.php" method="GET">
<select name="print">
<option value="true">Printable version</option>
<option value="false">Normal version</option>
</select>
<input type="submit" value="Go!">
</form>
That renders a dropdown which works much better! Less clutter than radio buttons as well!
Thank you everybody!
Especially Sirkent! I knew the media attribute was the answer, but I didn't know how to apply it. Thanks for the article. It showed me that it is only displayed when printed.