Код: Выделить всё
. i'm hoping to get the user information from my Код: Выделить всё
array already inputted into the form ready to edit and update, using Ternary Operators< /code> `< /p>
$employeesarray ([0] => Array ([id] => 1 [0] => 1 [first_name] => tracy [1] => tracy [last_name] => Walker [2] => Walker [пароль] => [3] => [IS_ADMIN] => 0 [4] => 0) [1] => [ID] => 2 [ID_ADMIN] => 0 [4] => 0). => Emma [1] => emma [last_name] => cooper [2] => cooper [пароль] => [3] => [is_admin] => 0 [4] => 0) [2] => array ([id] => 3 [0] => 3 [first_name] => savannah [1] => savannah [last_name] => => = grege [2] [2] [1] => savannah [first_rege] => => = Fargo [2] [1] => savannah [2] => = grege. => [3] => [is_admin] => 0 [4] => 0) [3] => Array ([id] => 4 [0] => 4 [first_name] => Помогая [1] => Помощь [last_name] => hands [2] => hands [пароль] => [3] => [is_admin] => 0 [4] => 0) < /press> [3] => [is_admin] => 0 [4]. class = "Snippet">
Код: Выделить всё
const openButton = document.querySelector("[data-open]");
const updateButtons = document.querySelectorAll("[data-update-id]");
const closeButton = document.querySelector("[data-close-modal]");
const modal = document.querySelector("[data-modal]");
updateButtons.forEach(button => {
button.addEventListener("click", () => {
// When any of them are clicked, show the modal
modal.showModal();
});
});
openButton.addEventListener("click", () => {
modal.showModal();
});
// close modal
closeButton.addEventListener("click", () => {
modal.close();
});
modal.addEventListener("click", e => {
const dialogDimensions = modal.getBoundingClientRect();
if (
e.clientX < dialogDimensions.left ||
e.clientX > dialogDimensions.right ||
e.clientY < dialogDimensions.top ||
e.clientY > dialogDimensions.bottom
) {
modal.close();
}
});< /code>
New Employee
Подробнее здесь: [url]https://stackoverflow.com/questions/79715700/how-do-i-use-javascript-variables-in-php-or-a-php-array-with-js[/url]
Мобильная версия