Fermé

Help with simple code - 5 min job

I need help with a piece of code im writing

In short, there is a variable in my php code that is set from reading a database, i need this variable in my php page to be updated every 1 second without refreshing the page

Currently, the website will show a loading page, i want the loading page to be shown depending on a database results

So to explain more:

I have already made the database, connected everything,

When the user gets onto the loading page, their status in the database table is set to "1"

i want this loading page to be shown until their status in the database table is changed.

If it is changed to anything that is NOT "1" then it will redirect to another page

Im guessing i need to use JS / AJAX to run this script every second:

$query2 = "SELECT * FROM panel WHERE user = '$userID' ";

$result = mysqli_query($conn, $query2);

while($row = mysqli_fetch_array($result)){

$status = $row['status'];

}

but how can i do this?

Compétences : PHP, MySQL, JavaScript, AJAX, Architecture Logicielle

en voir plus : can i teach myself code and get a job, codecademy, udemy, getting into programming, how to get a coding job, how long to learn programming to get a job, freecodecamp, learn to code in less than 5 months, how to learn coding and get a job, how to become a coder in 6 months, jobs that will teach you to code, coding, simple code conversion currency using compiler, help fix code, please help zip code, captcha code data entry job, help college student needs summer job, need captcha code data entry job, simple php work beginner job, bid code online flex job

Concernant l'employeur :
( 4 commentaires ) Birmingham, United Kingdom

Nº du projet : #26805885

20 freelance font une offre moyenne de £16 pour ce travail

BaNgan

Hi there You can trigger the ajax via jquery in your main page Would you mind to show me all the code you are working? Thanks Ngan

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(445 Commentaires)
7.7
shihan033010

Hi I can complete the functionality using ajax. Please accept the bid and create the milestone. I am ready to start the project now. Thanks Shihan

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(335 Commentaires)
6.9
julienmoutier

Hi, I'm expert in this kind of script and available immediately. I can do it by the next few minutes. Contact me to discuss and start. Thanks

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(59 Commentaires)
6.0
(117 Commentaires)
6.0
shanymathew

Hello Sir am an expert i can do this without refreshing page and i will explain it to you please message me i will do Thank You

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(69 Commentaires)
5.4
psharma3368

Hello sir, We can use jquery ajax to check this variable in database without refresh page and on change this variable we can redirect to other page. please text me so we can start work. thanks

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(26 Commentaires)
4.6
brahmaniinfoline

Hello sir, I can make your script. I can work right now. I have a 10 years of experience as PHP web developer. I will give you best quality of work. Waiting for your reply. Thank you.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(29 Commentaires)
4.8
tomas0427aw

Hello, I could help you out with writing AJAX request that will be checking for status in the database. Looking forward to hearing from you!

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(23 Commentaires)
4.6
victorciobanu999

Hi, I am interested in it. Looking forward to your response. Thanks.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(3 Commentaires)
3.7
fadeevdoma

Hello, I can do it in an hour. I am PHP, Javascript expert and I can update the page following DB change using AJAX. Please contact to me and get result in an hour. Thank you.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(7 Commentaires)
3.6
nemanja1029

Hello. 15 GBP I have many experience about the PHP, MySQL, Javascript, Jquery, Ajax, HTML, CSS, Bootstrap and PHP framework (Code igniter, Laravel, Yii2, Word press, Moodle). And i can design and manage the mysql data Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% GBP en 7 jours
(3 Commentaires)
1.2
SKsaurav271989

I am a full stack developer and i have 10 year experience in the development and designing. i am working in WordPress: Theme development, plugin Development, theme customization , plugin custmization, Api development, Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% GBP en 7 jours
(0 Commentaires)
0.0
mitnets

I will help you complete it... Using vanilla JS and php

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(0 Commentaires)
0.0
cycodesignwork

Dear client. I am a full-stack web developer with MERN. I am a new freelancer but i have rich experience in web with laravel,ci, javascript,php,MERN,MEVN. I can do it in 30 min. Looking forward to your interview to dis Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(0 Commentaires)
0.0
ibsk8r

Hi. I will do it for you as well as explain how to do it so you could do it yourself in future projects. Happy to help! Nisan.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(0 Commentaires)
0.0
eldarbutuhanov

<?php while(true) { $now_time = time(); $before_tmim = time()-1; if($now_time - $before_tmim == 1) { $query2 = "SELECT * FROM panel WHERE user = '$userID' "; $result Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(0 Commentaires)
0.0
Ranavikas36

Hi there, I am expert in php and help you to complete your script in php with js and ajax call for your script. Please ping me. I will start right now. Waiting for your response. Thanks,

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(0 Commentaires)
0.0
sjha60617

AJAX is the solution to your problem. [SAMPLE CODE IS ALSO AVAILABLE] Hii, I can update your php variable every second, this project will hardly take 5-10 minutes... I am Microsoft certified in Javascript and Computer Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(0 Commentaires)
0.0
AkostarMS

Hi there. First of all, I hope you and your family are safe from COVID-19. Having your job description "Help with simple code - 5 min job". I am very glad to inform you that I am very interesting about your job descrip Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% GBP en 1 jour
(0 Commentaires)
0.0
sushmiputtur

I am a php developer. i have experience in php,mysql,mongo db,java script and jquery with codeigniter and symfony framework.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% GBP en 7 jours
(0 Commentaires)
0.0