Hi everyone I am a week old Javascript and PHP self learner and a bit confused. I am trying to make a web application "Visitor Appointment System" with following features: 1. Receptionist/visitor will register visitor details and contact person. 2. There will be a dashboard what will list all active visitors for the day. 3. Visitors that had waited for more than 15 minutes will be highlighted. So there will be a minute counter visible in the dashboard for all users that will trigger the highlighting function. 4. Contact person from the whole company may put notes or accept the visitor. 5. Report to be generated every end of the week listing all visitors per day. So here is my queries. 1. how/what to use for minute counter feature. 2. will I use javascript or php for this projects? Your inputs are highly appreciated. Thanks.
Your question is on JavaScript and PHP and you have posted this forum under JSP and expecting a reply. Isnt that a bit too much? Moved your thread to PHP forum
For minute counter feature it has to be PHP and you should store the value of the visitor's entry in database and then cron should verify and update the status.
Yeah, as Shabbir already said, PHP is needed for this to be done, and some SEQEL language would be also useful.
Javascript or PHP? You need both. Javascript is browser-side scripting why PHP is server-side scripting. You need a combination of the two to elegantly accomplish what you want.
Ehm...? You don't need JS, it just mostly used for design ... For proper function you will just need PHP.
Ehmm...? No. Wrong. Javascript is not used mostly for design. Look at his project objectives. Maybe he doesn't want to POST and GET for every single little thing. Maybe he doesn't want to have to refresh the browser for every single little thing. PHP is SERVER SIDE. The most elegant solution would be a good balance between PHP and Javascript. They are used together all the time. It's actually very common if not a norm. Of course, where to use which will be decided as he goes along when he figures out exactly how he wants to do each thing but best practice is to use a good combination of both.
Yes, you are right, JS is good for this, (I havent said it isnt), but its not necessary(as you said too). Thats all.... Peace
Hi! Thanks to your replies... I agree that I will have to use both scripts but I do not know what is better for what function. I like for the counter functionality, I think it would be better to JS as I do not like this stored on the DB just starting and ending. For database function/transaction sure it would be PHP. Thanks again.
Hey everyone, You can also use JavaScript's Alert command to execute a PHP function that has the database routine in it. You can put any PHP code in a PHP function and let JavaScript use it. The only thing you have to remember is to echo something last that the Alert command can use. Thanks and regards Carly Fiorina
sounds a good idea however I'm really new to php and javascript that I hardly figure what you're suggesting, if you could give me the code I want that will be great for me. thanks.