Need toast notifications from database to be displayed with ajax
$10-30 USD
Cerrado
Publicado hace más de 5 años
$10-30 USD
Pagado a la entrega
I have a database with the columns setup like id,user_id,code
In the code column the [login to view URL] notification code is stored which is base64 encoded
When you display the code you must decode the base64 and it will display the toast notifications
I had my code setup like
<?php
// toast notifications
$sql_not = "SELECT code FROM notifications WHERE user_id = '$id'";
$sql_not_result = $conn->query($sql_not);
$num = $sql_not_result->num_rows;
for ($i=0;$i<$num;$i++) {
$notifications = mysqli_fetch_row($sql_not_result);
echo base64_decode($notifications[$i]);
$delete = "DELETE FROM notifications WHERE code = '$notifications[$i]' AND user_id ='$id'";
$conn->query($delete);
}
?>
The problem with my code is when there is multiple notifications it will only show one by one and also you have to reload the page to see the notifications. I want it so you do not have to reload the page and it will show all the notifications. Also after it has shown the notifications for the notifications for that user_id to be deleted.
Thank you
Hi I am interested to Toast notifications from database to be display with ajax, I am expert in PHP Jquey AJAX, I can change the logic don't worry, I can start the project immediately and done. Thanks..
Hello, Jrichyy
would you mind use AJAX to fix that for you?
I can start immediately for you and fixed that in professional way.
looking forward to hearing back from you .
Extensively doing web development for the last 7 years. I guess what you need is the following.
1) Create a notifications area on the top part of your main page.
2) A JavaScript based interval will cause this area of the page automatically refreshed every 30 seconds.
3) The refresh of the area would be AJAX based and would grab the notifications from the DB, pop them up on the notifications area and delete from db.
4) In this way, usually it will be just one new notification outstanding to be displayed. However, if there are somehow more than one that arrive almost simultaneously, we would show all of them in the descending order of notification time i.e. latest on top.
5) I am confident that I will easily do it within one day.
hello im sure that i can fix your problem and im ready to do as quite as posible
i hope that i can work with you
if you need to talk with me send me a message