it there an easy way then all those if else functions. Because i want to add italics and underniled. Doing it that way would take about 18 if else statements. Is there a way to do those if elses with out the if else part. does anybody even get what i mean. How can i simplify this?
<?php
header("Location: http://****************webmaster66/amtesting/send2.html");
$handle = fopen("am2.txt", "a");
{
if ($REQUEST["color"] != NULL && $REQUEST["bold"] != NULL)
{
fwrite($handle, $COOKIE['username'] );
fwrite($handle, ": ");
fwrite($handle, "<b>");
fwrite($handle, "<font color='" . $REQUEST["color"] . "'>");
fwrite($handle, $REQUEST["user"]);
fwrite($handle, "</font></b>");
}
else
{
if ($REQUEST["color"] != NULL)
{
fwrite($handle, $COOKIE['username'] );
fwrite($handle, ": ");
fwrite($handle, "<font color='" . $REQUEST["color"] . "'>");
fwrite($handle, $REQUEST["user"]);
fwrite($handle, "</font>");
}
else
{
if ($REQUEST["bold"] != NULL)
{
fwrite($handle, $COOKIE['username'] );
fwrite($handle, ": ");
fwrite($handle, "<b>");
fwrite($handle, $REQUEST["user"]);
fwrite($handle, "</b>");
}
else
{
fwrite($handle, $COOKIE['username'] );
fwrite($handle, ": ");
fwrite($handle, $REQUEST["user"]);
}
}
}
}
fwrite($handle, "\r\n");
fclose($handle);
exit;
?>