<?php if ( strstr($_SERVER['HTTP_USER_AGENT'], "MSIE") )
   {   include(
"convert_ie_demo.php");  exit;  }
   
header("Content-Type: application/xhtml+xml");
   print(
'<?xml version="1.0" encoding="UTF-8" ?>');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
    "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Infix to MathML Conversion Demo</title></head>
<body style="padding: 50px; background-color: #e0e0e0">
<?php $expr = $_POST['expr'];
    if (
$_POST['simp'] )
    {   
$simp="yes";  }
    else
    {   
$simp="no";   }
    
$br = "nn";
    if (
$expr )
       include(
"convert_client.php" );
    else
    {
?>
<p>Make sure you are using Firefox 1.5 or higher with Math fonts
already installed.  See <a href="http://www.mozilla.org/projects/mathml/fonts/">these instructions</a> for installing math fonts.</p>
<form action="" method="post">
<p><b>Infix expression:</b>&nbsp;&nbsp;<input name="expr" />&nbsp;&nbsp;<input type="submit" value=" Convert to MathML " /><br /><br />
<input id="si" type="checkbox" name="simp" value="yes" /> <label for="si">with simplification</label></p>
</form>
<? }  ?>
</body></html>