Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- HTML -->
- <form method="post">
- <select name="priority" class="field80" onChange="updatePriority('<?=$item['exception_id']?>')" style="margin:0;" <?=$disabled?>>
- <option value="high">high</option>
- <option value="medium">medium</option>
- <option value="low">low</option>
- </select>
- </form>
- <!-- jQuery -->
- <script type="text/javascript">
- function updatePriority(exception_id){
- $.ajax({
- data: data,
- type: 'post',
- url: 'ajax.php?page=ajx_exception_priority',
- success: function(data){
- alert("Data save: "+ data)
- }
- });
- }
- </script>
- <!-- PHP -->
- <?php
- if (isset($_POST['priority'])) {
- query("
- UPDATE
- `exceptions` (
- `priority`)
- VALUES (
- ". $_POST['priority'] .")
- WHERE
- `exception_id` = ". $exception_id ."
- ");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment