i want to write a php script to find if a given number is prime or not : <p>I have tried to create a code which is</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
&lt;body&gt;
	&lt;form method = "post"&gt; 
		&lt;?php
	    	    Number : &lt;input type = "text" name = "prime"&gt;;
	    	    &lt;input type = "submit" value ="Submit"&gt;;
	    	    $num = $_REQUEST["prime"];
	    	    $flag = 0;
	    	    for($i = 2; $i &lt;= $num/2; $i++)
	    	    {
			if( $num % $i == 0)
			{
		    	    $flag = 1;
		            break;
		        }
	    	    }
	    	    if($flag == 0)
			echo "$num is a prime number";
	    	    else
			echo "$num is not a prime number";
		?&gt;
	&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
</div>
</div>
</p>

<p>Whenever i try to run it, i get the error
    <strong>Parse error: syntax error, unexpected '&lt;', expecting end of file in 
    C:\xampp\htdocs\pc.php on line 5</strong></p>

<p>Any help would be appreciated </p>
