what is the correct syntax to use when testing if a posted form value contains text equal to XX php
<p>I'm trying to write an if statement to test if a posted form value is equal to xx</p>

<pre><code> $field = $_POST['myfield'];

 if($field == 'Hello world') {

 / /do something 

 }
</code></pre>

<p>Is this correct..?</p>

<p>Thanks</p>
