title: Is it possible for javascripts to have hrefs with IDs?
body: <p>Is it possible to add an href containing an id to be inside runConfirm function? My aim is a pop-up to appear after I click accept and the accept button does the query from isset.</p>
  
  <p>Here is my code for accepting.</p>
  
  <pre><code>$displaybody .= "&lt;tr&gt;
  &lt;td&gt;" . $rows['lname'] . ", " . $rows['fname'] . "&lt;/td&gt;
   &lt;td&gt;" . $rows['subject'] . "&lt;/td&gt;
   &lt;td&gt;" . $rows['days'] . " " . $rows['rstime'] . " - " . $rows['retime'] . " 
  &lt;/td&gt;
     &lt;td&gt;" . $rows['note'] . "&lt;/td&gt;
    &lt;td&gt;
  &lt;a class='runConfirm' data-id='" . $rows['rid'] . "'&gt;Accept&lt;/a&gt;                
  &lt;a href='home.php?decline=" . $rows['rid'] . "'&gt;Decline&lt;/a&gt;
  &lt;/td&gt;
  &lt;/tr&gt;"
  </code></pre>
  
  <p>And here is my function for the popup. (Updated)</p>
  
  <pre><code>&lt;script type='text/javascript'&gt; 
          $(function(){
          $('.runConfirm').click(function(event){
            // get the id you want to act on
            var theId = $(this).data('rid');
  
            // ask user for confirmation
            alertify.confirm('Are you sure to accept this request?',
  
              // accepted
              function(){
  
                // go to the processing page
                window.location('/accept.php?rid=' + theId);
              },
  
              // declined
              function(){
                alertify.error('You clicked CANCEL');
            }).set('closable', false);
  
          });
          });
    &lt;/script&gt;
  </code></pre>
  
  <p>Accept.php containing the process for accepting the booking.</p>
  
  <pre><code>    &lt;?php
      include("server.php");
      session_start();
  
      if(isset($_GET['accept']))
      {
        $rid=$_GET['accept'];
              $query=$mysqli-&gt;query("SELECT qid FROM requests WHERE rid='".$rid."'");
                  if($query-&gt;num_rows&gt;0)
                  {
                          while($rows=$query-&gt;fetch_assoc())
                          {
                              $qid=$rows['qid'];
                          }
              }
  
       $query1=$mysqli-&gt;query("UPDATE qualified SET status='accepted' WHERE 
     qid='".$qid."' ");
       $query=$mysqli-&gt;query("UPDATE requests SET action='accepted' WHERE 
     rid='".$rid."'");
  
       header("Location:home.php");
     }
  
     ?&gt;
  </code></pre>