title: I want to track visitor visits and change behaviour in PHP
body: <p>I want to write a script that tracks visitor visits on my page and do the following things: </p>
  
  <p>behavior 1)If this is the first visit to the site, prompt the user for their first and last names, and provide radio buttons with "red", blue", "yellow", Green"</p>
  
  <p>behavior 2) IF the user presses the submit button but has left one of the name fields empty, tell the user to press their browser's BACK button and enter both names. The user must enter a first name and a last name.</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang = "en"&gt;
  &lt;head&gt;
  &lt;title&gt;track visits&lt;/title&gt;
  &lt;meta charset ="utf-8"&gt;
  &lt;/head&gt;
  &lt;body style = "background-color:#f5f5f5;color#080808"&gt;
  
  
  &lt;Main&gt;
  &lt;h2&gt;  New Media and Web Design&lt;/h2&gt;
  &lt;p&gt; Welcome to Media Design it will bring your company &amp;rsquo;s Web preference to the next level.&lt;br&gt; We offer a comprehensive range of services
  &lt;/p&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  if(isset($_COOKIE['a']))
  {
  
      $c = $_COOKIE['a'] + 1;
  
      setcookie("a", $c, time() + 60 * 60 * 24);
  
  
      echo "Visit number: " . $_COOKIE['a'];
  }
  else
  {
          setcookie("a", "1", time() + 60 * 60 * 24);
  }
  If $_COOKIE['a']= 1{
  
      echo "hello";
  }
  
  ?&gt;
  </code></pre>