title: Multiple WHERE condition in PHP
body: <p>I am fetching data from python script using post method in php and storing that data in database.</p>
  <p><strong>PHP Script:</strong></p>
  <pre><code>&lt;?php
  if (isset($_POST['sign'])) {
      
      $sign = $_POST['sign'];
      $msg = $_POST['msg'];
      echo $sign . &quot; &quot; . $msg ;
      $sql1 = &quot;INSERT INTO data1 (message, sign)
      VALUES ('$msg','$sign')&quot;;
      if ($conn-&gt;query($sql1) === TRUE) {
          echo &quot;New record created successfully&quot;;
      }   
      else {
          echo &quot;Error: &quot; . $sql1 . &quot;&lt;br&gt;&quot; . $conn-&gt;error;
      }
  }
  else {
      echo &quot;&quot;;
  }
  $sql2 = &quot;SELECT message FROM data1 WHERE id= (SELECT max(id) FROM data1) AND sign= '&quot;.$sign.&quot;'&quot;;
  $result = $conn-&gt;query($sql2);
  
  if ($result-&gt;num_rows &gt; 0) {
      while($row = $result-&gt;fetch_assoc()) {
          
              echo &quot;message: &quot; . $row[&quot;message&quot;];
              $c= escapeshellcmd('python new.py'   .$row[&quot;message&quot;] );
              echo &quot;&lt;br&gt;&quot;;
         
          
              
      
          
      }
  }
  else {
    echo &quot;0 results&quot;;
  }
  
  ?&gt;
  </code></pre>
  <p>data is storing in database perfectly but after execution of read query it gives error that &quot;Undefined variable : sign&quot;
  if anyone have any idea about it kindly share Thank you.</p>