title: Having trouble passing variable from php to bash
body: <p>I'm trying to set up an html form that passes variables to a php script, that then passes them to a bash script.</p>
  
  <p>I'm able to successfully pass variables from the html form to the php script, and I'm able to make the following pass variables to my bash script:</p>
  
  <pre><code>&lt;?php
  shell_exec('./bashscript.sh testarg1 testarg2 testarg3 testarg4');
  ?&gt;
  </code></pre>
  
  <p>But, when I use the following:</p>
  
  <pre><code>&lt;?php
    shell_exec('./bashscript.sh $_POST[arg1] $_POST[arg2] $_POST[arg3] $_POST[arg4]');
  ?&gt;
  </code></pre>
  
  <p>I end up with:</p>
  
  <pre><code>[arg1]
  [arg2]
  [arg3]
  [arg4]
  </code></pre>
  
  <p>This is the first time I've tried passing from php to bash.  The bracketed arguments post to a db with no prob.  How would I change this to successfully pass the arguments to my bash script? thx.</p>