title: Popup window to open up a PHP page
body: <p>I have a manage users page which lets users to delete and update users. I'd like to make the delete and update users pages to be pop up windows with a close window option. but I don't know how, here is my mange users code</p>
  
  <pre><code>&lt;?php
  //MY PHP stuff
  ?&gt;
  &lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
  “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”&gt;
  &lt;html xmlns=”http://www.w3.org/1999/xhtml”&gt;
  &lt;head&gt;
  &lt;meta http-equiv=”Content-Type” content=”text/html; charset=utf-8” /&gt;
  &lt;title&gt;Manage Users&lt;/title&gt;
  &lt;link rel="stylesheet" type="text/css" href="../allcss/style.css" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;?php
  require('../Login/includes/header.inc.php');
  ?&gt;
  
  &lt;div id="personalised"&gt;
  &lt;p&gt;Hello, &lt;/p&gt;
  &lt;/div&gt;
  &lt;div id="content"&gt;
  &lt;table&gt;
    &lt;tr&gt;
      &lt;th scope="col"&gt;User email&lt;/th&gt;
      &lt;th scope="col"&gt;User name&lt;/th&gt;
      &lt;th scope="col"&gt;User role&lt;/th&gt;
      &lt;th&gt;&amp;nbsp;&lt;/th&gt;
      &lt;th&gt;&amp;nbsp;&lt;/th&gt;
    &lt;/tr&gt;
    &lt;?php while($row = $result -&gt;fetch_assoc()) { ?&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;?php echo $row['user_email']; ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row['user_name']; ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row['user_role']; ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;a href="update_users.php?person_id=&lt;?php echo $row['person_id']; ?&gt;"&gt;EDIT&lt;/a&gt;&lt;/td&gt;
      &lt;td&gt;&lt;a href="delete_users.php?person_id=&lt;?php echo $row['person_id']; ?&gt;"&gt;DELETE&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;?php } ?&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And this is the update_user.php page</p>
  
  <pre><code>&lt;?php
  
  require_once 'login.php'; 
  $table="users";
  $OK = false;
  $done = false;
  $conn = new mysqli ($host, $user, $password, $database) or die("Connection Failed");
  
  $stmt= $conn-&gt;stmt_init();
  
  if (isset($_GET['person_id']) &amp;&amp; !$_POST) {
    // prepare SQL query
    $sql = 'SELECT person_id, user_email, user_name, user_role FROM users
            WHERE person_id = ?';
    if ($stmt-&gt;prepare($sql))
    {
    $stmt-&gt;bind_param('i', $_GET['person_id']);
    $stmt-&gt;bind_result($person_id, $user_email, $user_name, $user_role);
    $OK = $stmt-&gt;execute();
    $stmt-&gt;fetch();
    $_SESSION['uemail_update'] = $user_email; //new
    }
  }
  if (isset($_POST ['update'])) {
    // prepare update query
    $sql = 'UPDATE users SET user_name = ?, user_role = ?
            WHERE person_id = ?';
    if ($stmt-&gt;prepare($sql)) {
      $stmt-&gt;bind_param('ssi', $_POST['user_name'], $_POST['user_role'], $_POST['person_id']);
      $done = $stmt-&gt;execute();
    }
  }
  // redirect if $_GET['aperson_id'] not defined
  if ($done) {
    header('Location: update_users_confirm.php');
    exit;
  }
  if (!isset($_GET['person_id'])) {
    header("Location: manage_users.php");
    exit;
  }
  // store error message if query fails
  if (isset($stmt) &amp;&amp; !$OK &amp;&amp; !$done) {
    $error = $stmt-&gt;error;
  }
  ?&gt;
  &lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
  “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”&gt;
  &lt;html xmlns=”http://www.w3.org/1999/xhtml”&gt;
  &lt;head&gt;
  &lt;meta http-equiv=”Content-Type” content=”text/html; charset=utf-8” /&gt;
  &lt;title&gt;Project Confirmation&lt;/title&gt;
  &lt;link rel="stylesheet" type="text/css" href="../allcss/style.css" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;?php
  require('../Login/includes/header.inc.php');
  ?&gt;
  
  &lt;div id="personalised"&gt;
  &lt;p&gt;Hello, &lt;/p&gt;
  &lt;/div&gt;
  &lt;div id="content"&gt;
  &lt;?php 
  if (isset($error)) {
    echo "&lt;p class='warning'&gt;Error: $error&lt;/p&gt;";
  }
  if($person_id == 0) { ?&gt;
    &lt;p class="warning"&gt;Invalid request: user does not exist.&lt;/p&gt;
  &lt;?php } else { ?&gt;
  &lt;form id="form1" method="post" action=""&gt;
    &lt;p&gt;
      &lt;label for="user_name"&gt;User name:&lt;/label&gt;
      &lt;input name="user_name" type="text" class="widebox" id="user_name" value="&lt;?php echo htmlentities($user_name, ENT_COMPAT, 'utf-8'); ?&gt;"&gt;
    &lt;/p&gt;
    &lt;p&gt;
      User role: &lt;select name="user_role" size="1" id="user_role"&gt;
      &lt;option value="PT"&gt;Part timer&lt;/option&gt;
      &lt;option value="FT"&gt;Full timer&lt;/option&gt;
      &lt;?php echo htmlentities($user_role, ENT_COMPAT, 'utf-8'); ?&gt;&lt;/select&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;input type="submit" name="update" value="Update Entry" id="update"&gt;
      &lt;input name="person_id" type="hidden" value="&lt;?php echo $person_id; ?&gt;"&gt;
    &lt;/p&gt;
  &lt;/form&gt;
  &lt;?php } ?&gt;
  &lt;/div&gt;
  
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Can someone please help me to make the update_user.php page appear in a pop up window which should also display confirmation.php page when its submitted. </p>
  
  <p>Thanks</p>