Jump to content

PNewCode

Members
  • Posts

    331
  • Joined

  • Last visited

Everything posted by PNewCode

  1. Okay, so the status... if it changes to Offline now, then yes he APPEARS to be offline. That part is awesome. So lets say I just update the Mysql to show offline. Then yes they will all APPEAR to be offline. But that doesn't mean they aren't still logged into the chat. They need to be literally logged out completely. I don't know what the function is that makes them logout. But I know when they click on "Logout", then they can't get back in unless they login again. Changing the "Status" only makes them LOOK offline but they can still be in the chat. That "Status" only changes the way they appear.
  2. Sure, sorry I should explain more. So when we get together online (there are only 8 of us) we all join at the same time. It's internal so it's private. It's not open to the public. And we all leave at the same time. There's a set amount of people and specific people that are in there and it never changes. I went in and manually changed the status to "Offline now" and that didn't log them out. That just made them look offline. I need to log them out completely because they would still have to manually click the logout button and then log back in to be able to appear back online themselves (sometimes some of them leave early or don't show up) So I need to be able to do more than change the "status" and literally log them out. Below is a screen shot of the Mysql database
  3. @ginerjmthanks for the reply. But I'm not wanting to delete all the users. I just need to log them out. Unless I'm misunderstanding. I should also note that I didn't write that. Its part of a package of pages that I paid someone to create.
  4. Hello, I have a chat system where I need the ability to log out all users at the end of the meeting. They can do this individually, however most of them neglect to do so and it is necessary for other purposes. Below is the link they have individually to log out. How could I edit this so that I can add it on my ADMIN page, and log out ALL of the people in the "unique_id" column of the database? <a href="php/logout.php?logout_id=<?php echo $row['unique_id']; ?>" class="logout">Logout</a> And here is the logout page php <?php session_set_cookie_params(0); session_start(); if(isset($_SESSION['unique_id'])){ include_once "config.php"; $logout_id = mysqli_real_escape_string($conn, $_GET['logout_id']); if(isset($logout_id)){ $status = "Offline now"; $sql = mysqli_query($conn, "UPDATE users SET status = '{$status}' WHERE unique_id={$_GET['logout_id']}"); if($sql){ session_unset(); session_destroy(); header("location: https://www.peredy1.com/adminchat/logintool.php"); } }else{ header("location: ../users.php"); } }else{ header("location: https://www.peredy1.com/adminchat/logintool.php"); } ?> Many many thanks for any help with this
  5. mac_Gyver you RULE! Thank you so much. And now I have a better understanding too. Totally makes sense. Thank you so much!
  6. Hello. I have been at this for days. What I have works, however it only works to copy the first entry. If there are 3 entries, they each get the button but all of them will only copy the first one in the list. Does anyone know how I can attach the ID in the database to make each listing independant for the copy information? Here is what I have. Many thanks in advanced. if(!empty($row["name"]) ){ echo "<b>Name:</b> " . $row["name"]. " <br> <b>Song:</b> " . $row["song"]. " <br> <b>Link: </b> "; ?><a target="_blank" href='<?php echo $row["band"] ; ?> ' ><?php echo $row["band"]. "</a> <br> <b>Notes:</b> " . $row["extra"]. " <br> <a href='deletetoo.php?id=".$row['id']."'><img src='/ppreq/deletebtn.jpg'></a> <input type='text' value=' Song: " . $row["song"] . " - Link: " . $row["band"] . " ' id='myInput'> <button onclick='myFunction()'>Copy</button> <br> <br> ________________<br> <br>"; } } } else { echo "0 Songs In Que"; } $conn->close(); ?> and my javascript <script> function myFunction() { // Get the text field var copyText = document.getElementById("myInput"); // Select the text field copyText.select(); copyText.setSelectionRange(0, 99999); // For mobile devices // Copy the text inside the text field navigator.clipboard.writeText(copyText.value); // Alert the copied text alert("Copied the text: " + copyText.value); } </script>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.