By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,256 Members | 1,700 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,256 IT Pros & Developers. It's quick & easy.

Nitifying logged in user after function execution

P: 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
Share this Question
Share on Google+
3 Replies


kovik
Expert 100+
P: 1,044
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

P: 64
help on this .....

"AJAX at predefined intervals"
Jul 31 '07 #3

kovik
Expert 100+
P: 1,044
help on this .....

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

Post your reply

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