title: I need specific output based on the input in the php form
body: <p>I need to display particular text based on the user's input
  for eg: If the user types in orange, i need the output to be Oranges are good for healt,
  if the input is apples, i want it to be apples are red.</p>
  <p>Sorry if the question is too basic, i am very new to php.</p>
  <p>My html code:</p>
  <pre><code>&lt;form method=&quot;post&quot; action=&quot;tips.php&quot; style=&quot;float: left; margin: 25px; font-size:300%;&quot;&gt;  
    Name: &lt;input type=&quot;text&quot; name=&quot;name&quot;&gt;
    &lt;br&gt;&lt;br&gt;
    &lt;center&gt;&lt;input type=&quot;submit&quot;&gt;&lt;/div&gt;&lt;/center&gt;
  &lt;/form&gt;
  </code></pre>
  <p>my php code:</p>
  <pre><code>&lt;?php
  $t = echo $_POST[&quot;name&quot;];
  
  if ($t ==&quot;Apple&quot;) {
    echo &quot;Apples are red&quot;;
  } 
  if ($t ==&quot;Oranges&quot;) {
    echo &quot;Oranges are good&quot;;
  } 
  
  ?&gt;
  </code></pre>