title: How do you pass a variable to FullCalendar ResourceViews URL
body: <p>I'm using the fullCalendar plugin for jQuery and I'm having an issue with passing a variable.</p>
  
  <p>Basically, what I want to is create a search and pass the search input to the url of the resource option.</p>
  
  <p>I have a search code and it looks like this</p>
  
  <pre><code>&lt;form action="employees.php" method="POST"&gt; 
      &lt;input type="text"   name="name" size="25" maxlength="230" 
             style="margin-left:5px;" value="" /&gt;
      &lt;br /&gt; 
      &lt;p style="padding-top:10px; margin-left:5px;"&gt;
       &lt;input type="submit" value="Submit" class="button" /&gt;
     &lt;/p&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>my employees.php with the Calendar script looks like this:</p>
  
  <pre><code>&lt;script type='text/javascript'&gt;
  $(document).ready(function() {
  
      var date = new Date();
      var d = date.getDate();
      var m = date.getMonth();
      var y = date.getFullYear();
      var calendar = $('#calendar').fullCalendar({
          header: {
              left: 'today prev,next',
              center: 'title',
              right: ''
          },
          defaultView: 'resourceWeek',
          refetchResources: true,
          selectHelper: true,
          numberOfWeeks: 1,
          weekends: false,
          firstDay: 1,    
          editable: false,
          selectable: false,
          refetchResources: true,
          selectHelper: true,
          resources: 'resource_employee.php',
   // more code
          ?&gt;
  </code></pre>
  
  <p>my resource_employee.php page looks like this</p>
  
  <pre><code>&lt;?php
  // some connection code
  $name = mysql_real_escape_string($_POST[name]);
  
  //$name = 'Goo'; 
  
  //$result = mysql_query("SELECT CONCAT(first_name, ' ', last_name) AS name, employeeID FROM ecc_employee WHERE first_name != '' ");
  $result = mysql_query("SELECT CONCAT(first_name, ' ', last_name) AS name, employeeID FROM ecc_employee WHERE CONCAT(first_name, ' ', last_name) LIKE '%$name%' ");
  
  $resources = array();
  
  while ($row=mysql_fetch_array($result)){            
      $name = ($row['name']);
      $id =  $row['employeeID'];
  
      $resources[] = array(
      'name' =&gt;  "$name",
      'id' =&gt; "$id"
      );
  
  }
  echo json_encode($resources);
  
  ?&gt;
  </code></pre>
  
  <p>Unfortunately this doesn't return anything because the $_POST[name] doesn't get pulled into this page because it's in the script.</p>
  
  <p>If I uncomment //$name = 'Goo'; then it will render, so I know it's not the SQL, it's getting that $_POST.</p>
  
  <p>How can I get the $_POST[name] into the query?</p>