jemgames
Sun 7 October 2007, 10:05 pm GMT +0200
With the recent craze about AJAX, and all the possibilities it can give, there is a subject I have been dying to discuss.
Take for instance a login system, written in PHP. Would it be possible to put that into a .htm file, using AJAX to communicate between Client and Server?
Discuss.
olaf
Sun 7 October 2007, 11:57 pm GMT +0200
sure your interface might be html files but you need php scripts to process everything
jemgames
Mon 8 October 2007, 08:28 am GMT +0200
Well, yeh, my thoughts precisley. But how would sessions work?
olaf
Mon 8 October 2007, 08:41 am GMT +0200
Well, yeh, my thoughts precisley. But how would sessions work?
the html files are only the interface (client code) everything on the serverside need to be processed by php scripts.
it makes no difference if the html code is generated by php or is presented by some html file
jemgames
Mon 8 October 2007, 08:54 am GMT +0200
No! I mean, have a .htm file with NO php code, and have PHP proccessed by the AJAX
olaf
Mon 8 October 2007, 09:06 am GMT +0200
No! I mean, have a .htm file with NO php code, and have PHP proccessed by the AJAX
actually that what I said a php file is a html file in the clients browser
jemgames
Mon 8 October 2007, 09:10 am GMT +0200
Mm i suppose...
I cant see how it would work though. How would you check if the user is logged in?
Nikolas
Mon 8 October 2007, 12:34 pm GMT +0200
I don't understand. Why to do this?
A user module is for security. One person can have some personalized features in your site.
If this would be done by javascript alone, anyone would be able to use anyone's rights.
olaf
Mon 8 October 2007, 12:35 pm GMT +0200
Mm i suppose...
I cant see how it would work though. How would you check if the user is logged in?
maybe you can tell us first what you try to do, just keeping us busy with your questions is not really fun :)
jemgames
Mon 8 October 2007, 04:36 pm GMT +0200
Sorry :S
Ok... I think ive found a way, thanks :P
Nikolas
Mon 8 October 2007, 04:59 pm GMT +0200
Of course there is a way, but I think there is no usability for such a thing. How do you intend to use it?
jemgames
Mon 8 October 2007, 06:46 pm GMT +0200
Well, I was trying to convert a login system into AJAX, but the idea struck me and I decided to try it.