title: How to pass querystring with JQuery?
body: <p>A very good morning, i am currently working on a simple php project, the goal of the application is to read Oracle data and display the result, i've completed this part. I am having a little doubt on how to pass querystring along with JQuery, please advice. Many thanks in advance.</p>
  
  <p>index.php - this is where i am passing the querystring
  index.php?campus=abc&amp;floor=xyz</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;`enter code here`
      &lt;title&gt;Olympia College :: Kiosk&lt;/title&gt;
      &lt;link rel="Stylesheet" type="text/css" href="assets/css/kiosk.css" /&gt;
  &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  // $(document).ready(function()
  // {
  //   $("#responsecontainer").load("contents.php");
  //   var refreshId = setInterval(function()
  //   {
  //       $("#responsecontainer").load('contents.php?randval='+ Math.random());
  //   }, 1000);
  //   $.ajaxSetup({ cache: false });
  // });
  
  function update() {
    $("#notice_div").html('&lt;img src="indicator.gif" alt="Synchronizing data, please wait a moment.."/&gt;&amp;nbsp;&amp;nbsp;Synchronizing data, please wait a moment..');
    $.ajax({
      type: 'POST',
  //    data: '{campus, floor}',
      url: 'timetable.php',
      timeout: 5000,
  
          success: function(data) {
            $("#some_div").html(data);
            $("#notice_div").html('');
            window.setTimeout(update, 10000);
          },
  
          error: function (XMLHttpRequest, textStatus, errorThrown) {
            $("#notice_div").html('Timeout contacting server..');
            window.setTimeout(update, 60000);
          }
      });
  }
  $(document).ready(function() {
      update();
  });
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;!--&lt;div id="responsecontainer"&gt;
      &lt;?php //echo date("l, F d, Y h:i:s" ,time());?&gt;
      &lt;/div&gt;--&gt;
      &lt;div id="main"&gt;
          &lt;div id="left"&gt;&lt;img src="assets/images/oc_logo.png" alt="Olympia College Malaysia"&gt;&lt;/img&gt;&lt;/div&gt;
          &lt;div id="right"&gt;&lt;div id="notice_div"&gt;&lt;/div&gt;&lt;div id="fright"&gt;&lt;a href="setting.php" title="Change settings"&gt;Setting&lt;/a&gt;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;&lt;a href="bug.php" title="Send bug report"&gt;Bug Report&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;    
      &lt;/div&gt;
      &lt;div id="line"&gt;&lt;/div&gt;
  
      &lt;br /&gt;
      &lt;div id="some_div"&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>timetable.php</p>
  
  <pre><code>&lt;?php
  $datasource = "******";
  $hostname = "******";
  $username = "*****";
  $password = "*****";
  $database = "*****";
  $campus = $_REQUEST['campus'];
  $floor = $_REQUEST['floor'];
  
  //KL CAMPUS
  if ($campus == 'ockl')
      $campus = 'KL CAMPUS';
  elseif ($campus == 'ocpj')
      $campus = 'PJ CAMPUS';
  elseif ($campus == 'ocpg')
      $campus = 'PENANG CAMPUS';
  elseif ($campus == 'ocip')
      $campus = 'IPOH CAMPUS';
  elseif ($campus == 'ockt')
      $campus = 'KUANTAN CAMPUS';
  elseif ($campus == 'ocjb')
      $campus = 'JB CAMPUS';
  
  //echo $_REQUEST['campus'];
  
  $connect = odbc_connect($datasource, $username, $password);
  
      if(!$connect){
          echo "Unable to connect!&lt;br /&gt;&lt;br /&gt;";
      }
      else {
          //echo "Successfully connected!&lt;br /&gt;&lt;br /&gt;";
      };
  
  $query = "SELECT DISTINCT 
            RESOURCE_DAY_TIME_SETUP.DAY, 
            RESOURCE_DAY_TIME_SETUP.FLOOR_CODE,
            RESOURCE_DAY_TIME_SETUP.RESOURCES_CODE,
            RESOURCE_DAY_TIME_SETUP.CAMPUS 
            FROM RESOURCE_DAY_TIME_SETUP WHERE CAMPUS LIKE '" . $campus . "'";
  $result = odbc_exec($connect, $query);
  
  echo "&lt;table border='1'&gt;";
  echo "&lt;tr&gt; &lt;th&gt;Day&lt;/th&gt; &lt;th&gt;Floor&lt;/th&gt; &lt;th&gt;Room&lt;/th&gt; &lt;th&gt;Duration&lt;/th&gt; &lt;th&gt;Start&lt;/th&gt; &lt;th&gt;End&lt;/th&gt; &lt;th&gt;Lecturer&lt;/th&gt; &lt;th&gt;Status&lt;/th&gt; &lt;th&gt;Campus&lt;/th&gt; &lt;/tr&gt;";
  
  while (odbc_fetch_row($result)){
      $day = odbc_result($result,1);
          $floor_code = odbc_result($result, 2);
      $resources_code = odbc_result($result,3);      
      $campus = odbc_result($result,4);
          echo "&lt;tr&gt;";
          echo "&lt;td&gt;$day&lt;/td&gt;";
          echo "&lt;td&gt;$floor_code&lt;/td&gt;";
          echo "&lt;td&gt;$resources_code&lt;/td&gt;";
          echo "&lt;td&gt;$resources_code&lt;/td&gt;";
          echo "&lt;td&gt;$resources_code&lt;/td&gt;";
          echo "&lt;td&gt;$resources_code&lt;/td&gt;";
          echo "&lt;td&gt;$resources_code&lt;/td&gt;";
          echo "&lt;td&gt;$resources_code&lt;/td&gt;";
          echo "&lt;td&gt;$campus&lt;/td&gt;";
          echo "&lt;/tr&gt;";
  }
  
  odbc_close($connect);
  
  echo "&lt;/table&gt;";
  ?&gt;
  </code></pre>
  
  <p>Hope someone here can shed some light to point me in the correct direction, many thanks in advance.</p>