I have a webpage containing a table that auto-refresh everytime & updates the table values. I want to add an alarm when the table value reached a threshold value so I don’t have to look at the table always. what is the best possible way to do this? My webpage is updating data using PHP. I know this is somewhat
Tag: php
Display items from the database in a chart
I want to display the average of results for each exam paper in a graph. my problem is that when I catch the data from my database I stored it in an array so that I couldn’t print these values as a list of array such as [“a”,”b”,”c”,”d”,”e”] or [44,100,50.29,100] to use it in var xValues and var yValues ,
Why is php POST array empty for me in one instance and populated in another, both using XHR POST?
I am trying to write code that will check if username is already used, and I wrote some test code where my php $_POST array was populated. However, I modified the test code slightly for the ‘production’ code I am developing, and my $_POST array is empty. My first set of code, that is working, html file is First set
WordPress: JS is loaded but functions in it are not working
I have a js file named “main.js” and I enqueued it using wp_enqueue_script in function.php file. This file is getting loaded in my page-{slug}.php, but the functions in it are not executing at all. The function.php file: page-{slug}.php file: main.js file: In short, I write anything in main.js file, the changes which I expect doesn’t happen or doesn’t reflect in
How to change background of div using button
I have code: How can I change background color of <div class=”block”> using buttons <input type=”button” name=”grey” value=”grey”> and <input type=”button” name=”red” value=”red”>? I tried to do it, but nothing helps. Who knows? P.S.: it doesn’t matter, what to use (PHP or JS). Answer for do that you can use javascript. I suggest to change the class of the div
Ajax call dynamically loaded rows
I have dynamically loaded(based on search result) content. (see the following) (stackoverflow is not allowing me to embed the image as I am still new) https://i.imgur.com/WVVc0wM.png Code for the above; I want to pass sid, classID to a seperate php file called add-student.php The following is add-student.php When I click ‘Add’ button for first time, it successfully adds to the
How to loop so I can separate 2 values? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I’m trying to make an inventory system as part for my e-commerce project so I need to get the price per product. The problem is
Form post not including the select input
I am trying to make a form to register the number of drinks that are taken from the fridge by a certain person. Currently I have three drinks in my db, meaning that I create 3 select tags and 3 input fields for the number of drinks per drink (e.g. coke, coke zero or coke light). In the code (somewhere
Javascript: Refresh current page after event change $_SESSION in a other page
I need help for a subtlety. I created a multilingual site without changing using the same php file, I just modify its content. For this I use sessions. So I configured 2 buttons: FR and EN which change the language. I go through another php file. With this code it works if I manually reload the page. But if I
Use Laravel route in javascript?
I have a Laravel route returning a JSON, and I have a JS file that dynamically generates a table with the results in a JSON. I just need to use this JSON in my JS table. That’s all. JS code (registroCarros should receive the value from the JSON, route or whatever) My Controller (dbtest is a function in my model