gnawz Posted July 26, 2007 Share Posted July 26, 2007 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 fro 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?? Link to comment https://forums.phpfreaks.com/topic/61914-user-notificationon-function-execution/ Share on other sites More sharing options...
micah1701 Posted July 26, 2007 Share Posted July 26, 2007 since all the code you posted is server-side PHP and any "pop-up" or "sound" alerts would have to be triggered client side -- this looks like a job for AJAX! check out the other forum on this board. Link to comment https://forums.phpfreaks.com/topic/61914-user-notificationon-function-execution/#findComment-308282 Share on other sites More sharing options...
ramli Posted July 26, 2007 Share Posted July 26, 2007 Depending on your formulation you can use somthing like this: <SCRIPT LANGUAGE="JavaScript"> <!-- start alert("Update Successfull") // end--> </script> Put this in a echo when your code is executed successfully Link to comment https://forums.phpfreaks.com/topic/61914-user-notificationon-function-execution/#findComment-308297 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.