Jump to content

Help with php+mysql update


gnawz

Recommended Posts

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.