-
Posts
597 -
Joined
-
Last visited
Everything posted by Adamhumbug
-
Create new line of dynamically populated content from button
Adamhumbug replied to Adamhumbug's topic in PHP Coding Help
And yes my goal is to add a new line to the chef and management individually -
Create new line of dynamically populated content from button
Adamhumbug replied to Adamhumbug's topic in PHP Coding Help
Hi Psycho, you are correct this will be submitted. I hadnt got around to sticking those in yet. -
Create new line of dynamically populated content from button
Adamhumbug replied to Adamhumbug's topic in PHP Coding Help
Hi Barand, would you be able to dump the db that you used to create this please as it is slightly different to my current layout but i would very much like to have a look at what you have created. It looks, from first glance, to be exactly what i need. The code looks a little complicated, so i want to have a good look through it and try and get my head around it. Thanks so much for putting in this much effort, it really is appreciated. -
Hi, I have a table row that has a dropdown and two textboxes in it. I would like to use a button that allows me to add another row beneath the existing row. It cannot be added to the bottom of the table as there is further content beneath. The content of the dropdown comes from a database query. The dropdown on the new row should have the selection in the first row greyed out. I expect this will need to be a js function but i dont really know where to start with it being dynamic content. This is the table as it stands if this provides clarity of my intentions - picture below echo "<form method='post' id='staffOrderForm'>"; $stmt->close(); echo "<table id='staffOrderTable' class='table table-striped table-bordered mt-3 text-center'>"; foreach($daterange as $date){ echo" <tr> <th class='table-dark' colspan='3'>".$date->format("l - jS F Y")."</th> </tr> <tr> <th class='' colspan='3'>Management </th> </tr> <tr> <th class='col-4'>Name</th> <th class='col-4'>Start Time</th> <th class='col-4'>End Time</th> </tr> <tr> <td> <select class='custom-select managerSelect'>"; $managerRoleId = 1; $stmt = $conn->prepare(" SELECT user_firstname, user_lastname, user_id FROM ssm_user WHERE user_role_id = ? "); $stmt->bind_param("i", $managerRoleId); $stmt->execute(); $stmt->store_result(); $stmt->bind_result($ufn, $uln, $uid); while($stmt->fetch()){echo "<option>".$ufn." ".$uln."</option>";}; echo"</select> </td> <td><input class='form-control' type='' name=''></td> <td><input class='form-control' type='' name=''></td> </tr> <tr> <th colspan='3'>Chefs</th> <tr/> <tr> <th class='col-4'>Name</th> <th class='col-4'>Start Time</th> <th class='col-4'>End Time</th> </tr> <tr> <td> <select class='custom-select chefSelect'>"; $chefRoleId = 2; $stmt = $conn->prepare(" SELECT user_firstname, user_lastname, user_id FROM ssm_user WHERE user_role_id = ? "); $stmt->bind_param("i", $chefRoleId); $stmt->execute(); $stmt->store_result(); $stmt->bind_result($ufn, $uln, $uid); while($stmt->fetch()){echo "<option>".$ufn." ".$uln."</option>";}; echo"</select> </td> <td><input class='form-control' type='' name=''></td> <td><input class='form-control' type='' name=''></td> </tr>"; } echo "</table></form>"; I appreciate that i will likely have to add a button with an onclick but from there i am pretty lost. As always i appreciate the help provided.
-
The following is giving me the results that i want and also means that the submit and update actions can be the same. <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); if (session_status() == PHP_SESSION_NONE) { session_start(); } if (!isset($_SESSION['user_id'])){ header("location: index.php"); } mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); include '../_includes/dbconn.php'; if ($_SERVER['REQUEST_METHOD']=='POST') { $jobId = $_SESSION['current_job_id']; $qty = $_POST['drinkItemQty']; // prepare insert query $stmt = $conn->prepare("INSERT IGNORE INTO ssm_drink_order (job_id, drink_id, drink_qty) VALUES (?,?,?) ON DUPLICATE KEY UPDATE drink_qty = VALUES(drink_qty) "); foreach ($_POST['drinkItemId'] as $k => $diid) { if ($qty[$k] > 0) { $stmt->bind_param("iii", $jobId, $diid, $qty[$k]); $stmt->execute(); } if ($qty[$k] < 1) { $stmt1 =$conn->prepare("DELETE FROM ssm_drink_order WHERE job_id = ? and drink_id = ?"); $stmt1->bind_param('ii', $jobId, $diid); $stmt1->execute(); } } } header("location: ../order-drink.php");
-
Thank you for this pointer - food for thought re: the rest of my tables.
-
Thanks Barand, i will have a look at this and see if i can make it work for me. My table structure is currently CREATE TABLE `ssm_drink_order` ( `surrogate_id` int(11) NOT NULL, `drink_id` int(11) NOT NULL, `drink_qty` int(11) NOT NULL, `job_id` int(11) NOT NULL ) ; ALTER TABLE `ssm_drink_order` ADD PRIMARY KEY (`surrogate_id`), ADD UNIQUE KEY `drink_id` (`drink_id`), ADD UNIQUE KEY `job_id` (`job_id`);
-
The goal is: The user enters a qty of each product that they would like to order. Click the submit button and the items are added to the order (submitted to the database) If they need to amend the order, they can change the values and they will be updated. Its not doing anything complicated at all. If there is a better way for me to be doing the whole thing i would appreciate any help as i am using this code in many places and just getting to grips with how it all works.
-
thanks for the tip with the exit, i wasnt aware of that. I am struggling a little to follow what you mean in your first line. My understanding not your explanation.
-
i have run them in phpMyAdmin and i have mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); i dont see any errors. Its confusing me as the rest of my pages use this method.
-
with the following <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); if (session_status() == PHP_SESSION_NONE) { session_start(); } if (!isset($_SESSION['user_id'])){ header("location: index.php"); } mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); include '../_includes/dbconn.php'; if ($_SERVER['REQUEST_METHOD']=='POST') { $jobId = $_SESSION['current_job_id']; $qty = $_POST['drinkItemQty']; // prepare insert query $stmt = $conn->prepare("INSERT INTO ssm_drink_order (drink_qty, job_id, drink_id) VALUES (?,?,?) ON DUPLICATE KEY UPDATE drink_qty = VALUES(drink_qty)" ); foreach ($_POST['drinkItemId'] as $k => $diid) { if ($qty[$k] > 0) { $stmt->bind_param("iii", $qty[$k], $jobId, $diid); $stmt->execute(); } if ($qty[$k] < 1) { $stmt1 =$conn->prepare("DELETE FROM ssm_drink_order WHERE job_id = ?"); $stmt1->bind_param('i', $jobId); $stmt1->execute(); } } } header("location: ../order-drink.php"); This is now removing everything from the database that was put in with the insert - effectively regardless of the quantity it thinks it is zero var_dump($qty[$k]) gives me string(3) "100" string(0) "" string(0) "" string(0) ""
-
var_dump of $_POST gives me array(3) { ["money_update_button"]=> string(0) "" ["drinkItemId"]=> array(4) { [0]=> string(1) "2" [1]=> string(1) "4" [2]=> string(1) "1" [3]=> string(1) "3" } ["drinkItemQty"]=> array(4) { [0]=> string(3) "999" [1]=> string(0) "" [2]=> string(0) "" [3]=> string(0) "" } }
-
Hi All, I have an insert/update that i am using in several places across my site, it works fine everywhere apart from on one page. I am clearly missing something but cant for the life of me work it out. My php: if ($_SERVER['REQUEST_METHOD']=='POST') { $jobId = $_SESSION['current_job_id']; $qty = $_POST['drinkItemQty']; // prepare insert query $stmt = $conn->prepare("INSERT INTO ssm_drink_order (drink_qty, job_id, drink_id) VALUES (?,?,?) ON DUPLICATE KEY UPDATE drink_qty = VALUES(drink_qty)" ); foreach ($_POST['drinkItemId'] as $k => $diid) { if ($qty[$k] > 0) { $stmt->bind_param("iii", $qty[$k], $jobId, $diid); $stmt->execute(); } if ($qty[$k] < 1) { $stmt1 =$conn->prepare("DELETE FROM ssm_drink_order WHERE job_id = ?"); $stmt1->bind_param('i', $jobId); $stmt1->execute(); } } } the page html <tbody> <tr> <th style="width:70%;" class="text-center">Drink Item</th> <th class="text-center">Quantity</th> </tr> <tr> <td> House Gin <input name="drinkItemId[]" type="hidden" value="2"> </td> <td class="text-center"> <input name="drinkItemQty[]" type="number" value="999" class="text-center"> </td> </tr> <tr> <td> House Brandy <input name="drinkItemId[]" type="hidden" value="4"> </td> <td class="text-center"> <input name="drinkItemQty[]" type="number" value="" class="text-center"> </td> </tr> <tr> <td> House Vodka <input name="drinkItemId[]" type="hidden" value="1"> </td> <td class="text-center"> <input name="drinkItemQty[]" type="number" value="" class="text-center"> </td> </tr> <tr> <td> House Whiskey <input name="drinkItemId[]" type="hidden" value="3"> </td> <td class="text-center"> <input name="drinkItemQty[]" type="number" value="" class="text-center"> </td> </tr> </tbody> Any help is as ever greatly appreciated
-
HI, I have a user form on a modal. The user can be updated from this modal but on the second tab is where the users password can be updated. The update button commits all changes including the password update. If the New Password field is blank i do not want it to be updated. I am using a prepared statement and am not sure how to ommit a field if it is blank. In actual fact there is a new password and a confirm password field which must be the same before the password field is updated. if ($_SERVER['REQUEST_METHOD']=='POST'){ $uid = $_POST['UM-uid']; $fname = $_POST['UM-firstName']; $lname = $_POST['UM-lastName']; $email = $_POST['UM-emailAddress']; $accountlevel = $_POST['UM-accountLevelId']; $mobile = $_POST['UM-mobileNumber']; $roleid = $_POST['UM-roleId']; $newpass = password_hash($_POST['UM-pass'], PASSWORD_DEFAULT); if(!empty($_POST['UM-firstName'])){ // prepare stmt $stmt = $conn->prepare(" UPDATE ssm_user SET user_password=?, user_email=?, user_firstname=?, user_lastname=?, user_account_level_id=?, user_mobile=?, user_role_id=? WHERE user_id = ? "); $stmt->bind_param('sssssssi', $newpass, $email, $fname, $lname, $accountlevel, $mobile, $roleid, $uid); $stmt->execute(); $_SESSION['user']=$fname." ".$lname; $_SESSION['updateUser']="has been successfully updated"; $_SESSION['actionstatus']="success"; I am sure i will be able to work out the password confirmation part, its just the omitting password from being part of the update if blank.
-
This is the whole page <?php if (session_status() == PHP_SESSION_NONE) { session_start(); } if (!isset($_SESSION['user_id'])){ header("location: index.php"); } $_SESSION['this_page'] = 'equipment-list'; ?> <?php include '_includes/head.php'; ?> <div class="container-fluid"> <div class="row"> <?php include '_includes/header.php'; ?> </div> <div class="row"> <div class="col-sm-2 p-0 bg-dark text-light" style="height: calc(100vh - 50px);"> <?php include '_includes/nav.php'; ?> </div> <div class="col-sm-10"> <?php if(isset($_SESSION['updateEquipment'])){ echo '<div id="infomessage" class="alert alert-'.$_SESSION["actionstatus"].' mt-3 text-center text-uppercase">'; echo "<b>".$_SESSION['eqname'] . "</b> " . $_SESSION['updateEquipment']; echo "</div>"; } unset($_SESSION['updateEquipment']); unset($_SESSION['eqname']); ?> <div class="scroll-fh"> <div id="equipmentTable" > <?php include '_includes/dbconn.php'; $sql = 'SELECT equipment_name, equipment_category_name, b.equipment_category_id, equipment_quantity, equipment_id FROM ssm_equipment a left join ssm_equipment_category b on a.equipment_category_id = b.equipment_category_id ORDER BY equipment_name ASC'; if ($result = mysqli_query($conn, $sql)){ if(mysqli_num_rows($result) > 0){ echo "<form method='post' id='equipmentListForm'>"; echo "<div class='input-group mt-3 mb-3'>"; echo "<div class='input-group-prepend'>"; echo "<span class='input-group-text'>Search (alt/option+s)</span>"; echo "</div>"; echo "<input id='equipmentTableSearch' onkeyup='searchTable()' type='text' class='form-control' placeholder='Plates...Soup Spoon...Red Wine Glass...'>"; echo "</div>"; echo "<table id='equipmenttable' class='table table-striped table-hover table-bordered text-center mt-3'><thead class='thead-dark'><tr>"; echo "<th>Equipment Name</th>"; echo "<th>Equipment Category</th>"; echo "<th>Equipment Quantity</th>"; echo "<th>Manage</th>"; echo "</thead></tr>"; echo "<tbody>"; while ($row = mysqli_fetch_array($result)){ echo '<tr>'; echo '<td class="align-middle">'. $row['equipment_name'] . '</td>'; echo '<td class="align-middle">'. $row['equipment_category_name'] . '</td>'; echo '<td class="align-middle">'. $row['equipment_quantity'] . '</td>'; echo "<td><div class='btn btn-primary col-sm-12' data-toggle='modal' data-target='#equipmentModal' data-equipmentid='".$row['equipment_id']."' data-equipmentname='".$row['equipment_name']."' data-equipmentcategory='".$row['equipment_category_id']."' data-equipmentquantity='".$row['equipment_quantity']."' >Manage</div>"; echo '</tr>'; } echo '</tbody>'; echo '</table>'; echo "</form>"; } } ?> </div> </div> <!-- User Modal --> <div class="modal fade" id="equipmentModal" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" id="equipmentModalLabel">Update Equipment</h4> <button type="button" class="close" data-dismiss="modal" > <span >×</span> </button> </div> <form method="POST" action="actions/update-equipment-action.php" id="updateEquipmentSubmit"> <div class="modal-body"> <input type="hidden" name="EM-id" id="EM-id"> <div class="md-form"> <div class="col-md-12 mb-3"> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text modalprew">Item Name</span> </div> <input name="EM-name" id="EM-name" type="text" class="form-control" placeholder="Equipment Item Name" required> </div> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text modalprew">Category</span> </div> <select name="EM-category" id="EM-category" class="custom-select"> <?php $sql = "SELECT equipment_category_id, equipment_category_name From ssm_equipment_category ORDER BY equipment_category_name ASC"; if($result = mysqli_query($conn, $sql)){ if (mysqli_num_rows($result)>0){ while ($row = mysqli_fetch_array($result)){ echo "<option value='".$row['equipment_category_id']."'>".$row['equipment_category_name']."</option>"; } } } ?> </select> </div> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text modalprew">Quantity</span> </div> <input name="EM-quantity" id="EM-quantity" type="text" class="form-control" placeholder="Equipment Quantity" required> </div> </div> </div> </div> <div class="modal-footer"> <button id="updateEquipment" type="submit" class="btn btn-primary">Update Equipment</button> <button name="delete-equipment-button" formaction="actions/delete-equipment-action.php" id="deleteEquipment" type="submit" class="btn btn-danger">Delete Equipment</button> </div> </form> </div> </div> </div> <script> $('#equipmentModal').on('show.bs.modal', function(event) { // Button that triggered the modal var button = $(event.relatedTarget) //data elements var equipmentid = button.data('equipmentid') var equipmentname = button.data('equipmentname') var equipmentcategory = button.data('equipmentcategory') var equipmentquantity = button.data('equipmentquantity') var modal = $(this) modal.find('.modal-title').text('Update Equipment - ' + equipmentname + ' x ' + equipmentquantity) modal.find('.modal-body #EM-id').val(equipmentid) modal.find('.modal-body #EM-name').val(equipmentname) modal.find('.modal-body #EM-category').val(equipmentcategory) modal.find('.modal-body #EM-quantity').val(equipmentquantity) }) </script> <!-- End Of User Modal --> <div class="col-sm-12"><?php include '_includes/footer.php'; ?></div> </div> </div> </div> <script> //set sidebar active indicator if(document.getElementById('equipment')){ document.getElementById('equipment').classList.add('show') } if(document.getElementById('equipmentList')){ document.getElementById('equipmentList').classList.add('blOrange') } $('#infomessage').fadeIn('fast').delay(3000).fadeOut('3000'); function searchTable() { var input, filter, found, table, tr, td, i, j; input = document.getElementById("equipmentTableSearch"); filter = input.value.toUpperCase(); table = document.getElementById("equipmenttable"); tr = table.getElementsByTagName("tr"); for (i = 1; i < tr.length; i++) { td = tr[i].getElementsByTagName("td"); for (j = 0; j < td.length; j++) { if (td[j].innerHTML.toUpperCase().indexOf(filter) > -1) { found = true; } } if (found) { tr[i].style.display = ""; found = false; } else { tr[i].style.display = "none"; } } } //keyboard shortcut to search bar document.onkeyup = function(e) { if (e.altKey && e.which == 83) { document.getElementById(equipmentTableSearch.id).focus(); document.getElementById(equipmentTableSearch.id).select(); } }; </script>
-
Well there is only one...but when you click any of the manage buttons it pops it.
-
HI have a modal that calls another modal to confirm deletion. On the confirm delete modal i want to show what the user that will be deleted has active in the system. I am passing through the active stuff that they have on the button using data-activesheets="". it all seems to work fine first time around. If you back out of the modals and click another user that doesnt have any active stuff, the modal content does not change. This is the JS that i am using to populate the second modal (with much help from @Barand) $('#userDeleteConfirmationModal').on('show.bs.modal', function(event) { // Button that triggered the modal var button = $(event.relatedTarget) //data elements var userid = button.data('userid') var activesheets = button.data('activesheets').split(", ").join("<br/>") console.log(activesheets); var modal = $(this) modal.find('#deleteUserConfLabel').text(userid) modal.find('#active-sheets-label').text('This user has the following active sheets') modal.find('#active-sheets').html(activesheets) }) I feel like it is setting the values and when it loads for the second time, it does not reset the values or remove them if they should be there.
-
Split string into new lines at comma -> update text
Adamhumbug replied to Adamhumbug's topic in Javascript Help
Thats the one!! -
Split string into new lines at comma -> update text
Adamhumbug replied to Adamhumbug's topic in Javascript Help
it is a p tag -
Split string into new lines at comma -> update text
Adamhumbug replied to Adamhumbug's topic in Javascript Help
when i use <br/> it echos that exactly. A new event<br/>Chelsea's Event -
Hi, I have the following code that populates a modal $('#userDeleteConfirmationModal').on('show.bs.modal', function(event) { // Button that triggered the modal var button = $(event.relatedTarget) //data elements var userid = button.data('userid') var activesheets = button.data('activesheets').split(", ").join("\n") console.log(activesheets); var modal = $(this) modal.find('#deleteUserConfLabel').text(userid) modal.find('#active-sheets-label').text('This user has the following active sheets') modal.find('#active-sheets').text(activesheets) the console log outputs Job 1 Job 2 but the text.(activesheets) shows them on the same line when they hit the page. Any ideas?
-
Outputting MySql data that contains ' into php variables
Adamhumbug replied to Adamhumbug's topic in PHP Coding Help
Thanks for that confirmation, sublime proved to be no help in solving this. Thanks again -
Outputting MySql data that contains ' into php variables
Adamhumbug replied to Adamhumbug's topic in PHP Coding Help
I can also confirm that when using your method, the ' does not cause me issue. Thank you so much for your help!! -
Outputting MySql data that contains ' into php variables
Adamhumbug replied to Adamhumbug's topic in PHP Coding Help
I just changed the closing TEXT; to have no white space on the same line and that has solved the issue. Go Figure -
Outputting MySql data that contains ' into php variables
Adamhumbug replied to Adamhumbug's topic in PHP Coding Help
if($_SESSION['user_level']=='100'){ echo <<<TEXT <td><a class="btn btn-primary col-sm-12" data-toggle="modal" data-userid="$uid" href="#userModal" data-firstname="$ufn" data-lastname="$uln" data-email="$ue" data-accountlevel="$ualid" data-mobile="$um" data-role="$urid" data-active-sheets="$ename">Manage</a></td> TEXT; } } echo "</tr> </tbody></table>"; ?> </div> <!-- User Modal --> <div class="modal fade" id="userModal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" id="userModalLabel">Users</h4> <button type="button" class="close" data-dismiss="modal" > <span >×</span> </button> </div> <form method="POST" id="updateUserSubmit"> <div class="modal-body"> <ul class="nav nav-tabs mb-3 ml-3 mr-3"> <li class="nav-item"><a class="nav-link active" href="#tab1" data-toggle="tab">User Info</a></li> <li class="nav-item"><a class="nav-link" href="#tab2" data-toggle="tab">Log On Info</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="tab1"> <input type="hidden" name="UM-uid" id="UM-uid"> <div class="md-form"> <div class="col-md-12 mb-3"> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text modalprew">First Name</span> </div> <input name="UM-firstName" id="UM-firstName" type="text" class="form-control" placeholder="First Name" required> </div> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text modalprew">Last Name</span> </div> <input name="UM-lastName" id="UM-lastName" type="text" class="form-control" placeholder="Last Name" required> </div> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text modalprew">Mobile Number</span> </div> <input name="UM-mobileNumber" id="UM-mobileNumber" type="text" class="form-control" placeholder="Mobile Number" required> </div> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text modalprew">Email Address</span> </div> <input name="UM-emailAddress" id="UM-emailAddress" type="text" class="form-control" placeholder="Email Address" required> </div> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text modalprew">Role</span> </div> <select name="UM-roleId" id="UM-roleId" class="custom-select"> <?php $sql = "SELECT role_id, role_name FROM ssm_role ORDER BY role_name ASC"; if($result = mysqli_query($conn, $sql)){ if (mysqli_num_rows($result)>0){ while ($row = mysqli_fetch_array($result)){ echo "<option value='{$row['role_id']}'>{$row['role_name']}</option>"; } } } ?> </select> </div> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text modalprew">User Level</span> </div> <select name="UM-accountLevelId" id="UM-accountLevelId" class="custom-select"> <?php echo "<option value ='0'>Please Select</option>"; $sql = "SELECT user_level_id, user_level_name, user_level_value From ssm_user_level ORDER BY user_level_name ASC"; if($result = mysqli_query($conn, $sql)){ if (mysqli_num_rows($result)>0){ while ($row = mysqli_fetch_array($result)){ echo "<option value='{$row['user_level_id']}'>{$row['user_level_name']}</option>"; } } } ?> </select> </div> </div> </div> </div> <div class="tab-pane" id="tab2"> <div class="md-form"> <div class="col-md-12 mb-3"> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text modalprew">New Password</span> </div> <input name="UM-pass" id="UM-pass" type="text" class="form-control" placeholder="New Pass"> </div> </div> </div> </div> </div> </div> <div class="modal-footer"> <button id="updateUser" formaction="actions/update-user-action.php" type="submit" class="btn btn-success">Update User</button> <a data-toggle="modal" data-userid="" href='#userDeleteConfirmationModal' id="callDeleteUserConf" class="btn btn-danger">Delete User</a> </div> </form> </div> </div> </div> <!-- End Of User Modal --> <!-- Start of modal --> <div class="modal fade" id="userDeleteConfirmationModal" tabindex="-1" role="dialog"> <div class="modal-dialog" > <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" id="deleteUserConfLabel">Delete - </h4> <button type="button" class="close" data-dismiss="modal" > <span >×</span> </button> </div> <form method="POST" id="deleteUserConfForm"> <?php $uid = $_SESSION['user_id']; $stmt = $conn->prepare("SELECT user_firstname, user_lastname FROM ssm_user WHERE user_id = ?"); $stmt -> bind_param('i', $uid); $stmt -> execute(); $stmt -> store_result(); $stmt -> bind_result($fname, $lname); $stmt -> fetch(); ?>