473,386 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Nitifying logged in user after function execution

64
I have a database for posting a new record.
I have a field for status.
Every time a new record is added to the table the status for unread is 1 while that for read is 2.

I want a user to be notified while he/she is logged in by a sound or pop-up whenever a new record has been
added or when status has changed ie when an update takes place.

PLEASE HELP.

My update code is something like this:


$sql = 'UPDATE exportatltable SET Depot="'.$_POST["Depot"].'",
CustomerName="'.$_POST["CustomerName"].'",Address="'.$_POST["Address"].'",EmailAddress= "'.$_POST["EmailAddress"].'",
Country="'.$_POST["Country"].'",Product1="'.$_POST["Producta"].'",Product2="'.$_POST["Productb"].'",Product3="'.$_POST["Productc"].'",
TotalProductQuantity="'.$_POST["TotalQuantity"].'",
TotalPrice="'.$_POST["TotalPrice"].'",TruckDetails="'.$_POST["TruckDetails"].'",Destination= "'.$_POST["Destination"].'",
PreparedBy="'.$_POST["PreparedBy"].'",AuthorisedBy="'.$_POST["AuthorisedBy"].'",AccountBf="'.$_POST["Accountbf"].'",
AmountRecieved="'.$_POST["AmountReceived"].'",LessThisOrder="'.$_POST["LessThisOrder"].'",Balance="'.$_POST["Balance"].'",
Currency="'.$_POST["Currency"].'",Narration="'.$_POST["Narration"].'",FinanceNote="'.$_POST["FinanceNote"].'",Status = 1, Date = Now() WHERE PfiNo="'.$_POST["PfiNo"].'"';
$query = mysql_query($sql);

I want a pop-up or sound or any other form of notification to any user logged in whenever
this code is executed successfully!

AFNY IDEAS??
Jul 29 '07 #1
3 1099
kovik
1,044 Expert 1GB
If you want it to be live, you'll need to use AJAX at predefined intervals. If you just want a notification upon page load, just query the database for new posts and, if there is at least one, display the notification.

And as for the sound... That'd be half-pointless, the other half being annoying.
Jul 29 '07 #2
gnawz
64
help on this .....

"AJAX at predefined intervals"
Jul 31 '07 #3
kovik
1,044 Expert 1GB
help on this .....

"AJAX at predefined intervals"
.... What part don't you understand?
Jul 31 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: John Whitmer | last post by:
I am trying to put together a web page to show remote users which PC's are available for RDP so they can use. The page work's fine except for when the goes to the pc to pull the info on if anybody...
10
by: Sorin Dolha [MCSD .NET] | last post by:
I would like to start a process from C# code as another user. The C# code is executed as the ASPNET user because it relies in a Web Page class, and I would like that the process will run as another...
16
by: Jm | last post by:
Hi All Is it possible to determine who is logged onto a machine from inside a service using code in vb.net ? I have found some code that seems to work under vb6, but doesnt under .NET ? Any help...
40
by: Jeff | last post by:
I have a system on a network and want to determine if anyone is currently connected to the back-end files. An interesting twist is that I have noticed that some users can be connected (have the...
4
by: shark | last post by:
hi, it might be a very stupid question but i want to know whether an execution plan is created in user defined functions in sql server 2000 like stored procedures. Thanks.
3
by: Lattis | last post by:
I have the following problem: User A is logged in to a windows 2000 terminal. He runs an application which runs under the credentials of a different user. If I try to see the current user...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
1
by: Adrock952 | last post by:
I have a link on my site which obviously says "Login" where users log in. I would like that link to be changed to "Logout" when the user has successfully logged in and the session has been created...
1
by: jvskarthick | last post by:
Whenever the “SELECT” command execution happens irrespective of any table inside one particular database Log information into one Log table. The Information required 1) User logged in ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.