satishpoul Posted December 10, 2012 Share Posted December 10, 2012 guys.. i m new here and came with hope of getting solution to my problem.i m developing one site which will be accessed by customers and employees of company.my doubt is clear that i want my employee will get notification as soon as any customer will sends an any inquiry or any feedback. so that i can processed that request as early as possible and make my customer happy ;)means my question is : i just want to get notification as soon as customer edit/add his data. thats it.so how can i implement this in php. (e.g Facebook live notification is best example u can assume. take Facebook notifications just as an example.)so please help me for this.thanks in advance Link to comment Share on other sites More sharing options...
rahultailwal Posted December 10, 2012 Share Posted December 10, 2012 On data changes you can send an email to relative employee or you can send SMS to employee phone. You need to use SMS service for that. That will be best for you. 1 Link to comment Share on other sites More sharing options...
satishpoul Posted December 10, 2012 Author Share Posted December 10, 2012 yahh but instead of sms n mail.. i have to use a notification pop-up like in Facebook or gmail chat. instant pop-up. Link to comment Share on other sites More sharing options...
justsomeguy Posted December 10, 2012 Share Posted December 10, 2012 You need to have some Javascript code that runs with a timer using either setTimeout or setInterval, which will periodically ask PHP for new notifications. Link to comment Share on other sites More sharing options...
satishpoul Posted December 10, 2012 Author Share Posted December 10, 2012 (edited) yess firstly thankx for reply..i m also searching but cant understand how can i do this.. means which type of functions will help me.. i have some knowledge about php but detailed js and javascript are new for me. i saw some functions like $ajax.( data: .. url: success: url: ) something like this.. can u tell me what is this so that i can start my search or give some links to start my search for this concept. Edited December 10, 2012 by satishpoul Link to comment Share on other sites More sharing options...
rahultailwal Posted December 11, 2012 Share Posted December 11, 2012 You are not specific in your question. Your customer will fill an inquiry form and employee will get notification. Where will he see that notification. Employee needs to be login to his dashboard and a popup will generate each time on his dashboard. If this then make a function, an ajax call in every 1 min which will see the inquiry in database and will pop up a box which will show all the latest inquiries if exist in database and automatically hides after 10 seconds. Link to comment Share on other sites More sharing options...
satishpoul Posted December 11, 2012 Author Share Posted December 11, 2012 yes that's what i want to do.. but i will make one special area or div for this alerts and all. so in that area i want to get notification. this area is comman on each page. and now which type of ajax function i will help me. i mean i will search upon it but confuse by which keyword i use to search. Link to comment Share on other sites More sharing options...
birbal Posted December 11, 2012 Share Posted December 11, 2012 http://w3schools.com/ajax here you go Link to comment Share on other sites More sharing options...
thescientist Posted December 11, 2012 Share Posted December 11, 2012 yes that's what i want to do.. but i will make one special area or div for this alerts and all. so in that area i want to get notification. this area is comman on each page. and now which type of ajax function i will help me. i mean i will search upon it but confuse by which keyword i use to search. to be clear, you intend for this to only show in a page dedicated to the client, correct? Not a common page on the clients public facing website, yes? Link to comment Share on other sites More sharing options...
satishpoul Posted December 11, 2012 Author Share Posted December 11, 2012 actually here i have two groups of users on my website1 customers2 employers from my company and customer will make inquiry or some activity or u can say send message to usand as soon as he sends message all the employers of my company will get notification on his account. i have not yet decided how i am gonna design it. but want to clear my concept before designing so that i will start implementing this. Link to comment Share on other sites More sharing options...
justsomeguy Posted December 11, 2012 Share Posted December 11, 2012 This describes how to use setInterval or setTimeout to have your code run periodically: http://www.w3schools.com/js/js_timing.asp Link to comment Share on other sites More sharing options...
satishpoul Posted December 11, 2012 Author Share Posted December 11, 2012 okk thankx.. i will make use of this.. and post here results sure..!! thankx all.. will be back here soon Link to comment Share on other sites More sharing options...
birbal Posted December 11, 2012 Share Posted December 11, 2012 you can make and table for message and put a field as flag to mark them as read-unread. when user send an query you save the data to that table and mark that flag as unread. Now on employee script get all message where that column is unread. in this part you can use ajax to get periodic request to it to get unread message. All employee will be updated by any new unread message. when you pull data from the table for your employee to get it read you set the read-unread column to "read". if uou want to that your user also can read the sent message just dont set the read column when they read it. do it only for your employee. 1 Link to comment Share on other sites More sharing options...
satishpoul Posted December 11, 2012 Author Share Posted December 11, 2012 yes Birbal thankx a lot man i get the entire concept. just nw waiting for technologies or functions to implement on each process. Link to comment Share on other sites More sharing options...
satishpoul Posted December 12, 2012 Author Share Posted December 12, 2012 (edited) thankx again everybody who replyed on here.i am gonna refer these links http://coursesweb.ne...ery/jquery-ajax http://jsfiddle.net/YXMPn/ for my concept. and if u also have any other links to refer please post here. Edited December 12, 2012 by satishpoul Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now