my code is doing the opposite
<p>my code is doing the opposite of what i want it to do,im trying to create a simple captcha when i enter the values or letters on the captcha and the username/name if the captcha letters are correct i want it to print <code>hi $name,you types the correct captcha</code> and if the data entered is wrong i just want it to print <code>nooo</code>.my problem is that when i enter the correct letters or data its printing noo and when i just leave it blank without entering any data its printing <code>hi $name,you types the correct captcha</code></p>

<p>this my simple code</p>

<pre><code>&lt;?php
session_start();
?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt; captcha test&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;?php
if(isset($_POST['submit'])){

if (isset($_SESSION['real'])) {
    $real = $_SESSION['real'];
}
$guess = $_POST['captcha'];
$name = $_POST['name'];
$real = "";
if ($real == $guess){

echo "hi $name,you types the correct name";
} 
else {

    echo "Nooo";
}

} else {
?&gt;
&lt;form action= 'index.php' method='post'&gt;
your name:&lt;input type = 'text' name='name' /&gt;
&lt;br /&gt;
&lt;img src= 'image.php'&gt;  &lt;input type='text' name='captcha' /&gt;
&lt;br/&gt;

&lt;input type= 'submit' name='submit' value='go' /&gt;
&lt;/form&gt;
&lt;?php } ?&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>what am i doing wrong?</p>
