php lessons/practice. need help understanding if/else
<p>ok so im here trying to practice some php (im a super beginner) and so long story short,
i put form elements in one page, passed it to the process php. 
Im just messing aound trying to see what ive learned so far. i dont get any errors, just dont understand why it doesnt work.</p>

<pre><code>&lt;?php 

$yourname = htmlspecialchars($_POST['name']);
$compname = htmlspecialchars($_POST['compName']);

$response = array("please enter correct information","hmm" . "$yourname");

function nametest() {
if (!isset($yourname)){
    $yourname = $response[0];}
    else { 
    $yourname = $response[1];;
    }
}
?&gt;


&lt;?php  nametest(); ?&gt;
</code></pre>

<p>what im trying to do is, that if the name isnt set, to make a variable equal to a value inside response.</p>
