So this time I have a HTML table and when I click in a anchor that is located in a tag it opens a modal, where we can change a user password.
But to update the password in the users table I need to get the ID. My problem is, how can I get the row ID/user ID in the modal.
My table is created trough a for:
for ($i = 0; $i < $size; $i++) {
print ("
<tr>
<td>".$Users[$i][0]."</td>
<td>".$Users[$i][1]."</td>
<td>*****</td>
<td><a data-modal-id='delete' target='_blank' href='#' >Change PW</a></td>
</tr>
<tr>");
}
So when I click the anchor the modal opens and I can manage to get the modal to work. What I need is somehow to get the ID to build the SQL query to update the password.
The modal:
<header>
<h3>Alterar Password</h3>
</header>
<div class="modal-body">
<form action="" method="POST" id="changepw" name="changepw">
<label>Nova Password:</label><br/>
<input class="textbox" type="password" name="newpassword" id="newpassword" /> <br/>
<input class="btnSubmit" type="submit" name="changepwSub" id="changepwSub" form="changepw" value="Alterar Password" />
</form>
</div>
<footer>
<a target='_blank' href="#" class="js-modal-close"><input class="btnSubmit" type="button" value="Fechar" style="max-width:100px;" /></a>
</footer>
<?php
//The PHP Code to Update it will be here.
$query = "UPDATE auth SET password=xxx WHERE ID="
?>
</div>
I have a few html pages that share the same navbar. Therefore I wrote one html file - topnav.html and I used the following jQuery code to load it into every page. javascript <script type="text/...
I have a few html pages that share the same navbar. Therefore I wrote one html file - topnav.html and I used the following jQuery code to load it into every page. javascript <script type="text/...
Within a redux saga I am sending a half dozen fetch requests to different systems. I want to wait until all those requests return, then do some final processing on the results. To this end I have an ...
Within a redux saga I am sending a half dozen fetch requests to different systems. I want to wait until all those requests return, then do some final processing on the results. To this end I have an ...
I would like to change my navigationbar background color , but return to me : TypeError: Object is not a function(evaluating 'renderHeader'); How can i fix this error? static navigationOptions = ({...
I would like to change my navigationbar background color , but return to me : TypeError: Object is not a function(evaluating 'renderHeader'); How can i fix this error? static navigationOptions = ({...
Hide show only works on first element, Once cloned stopped working. FIDDLE HERE : https://jsfiddle.net/rmpLvx7h/18/ On click on Image , Images should show in the particular div ( clicked element /....
Hide show only works on first element, Once cloned stopped working. FIDDLE HERE : https://jsfiddle.net/rmpLvx7h/18/ On click on Image , Images should show in the particular div ( clicked element /....