PDA

View Full Version : Extjs 4 and PHP-Anyone?



Shabneez
8 Jan 2013, 5:32 AM
Hello,

Im quite stuck here- could anyone please show me how to achieve the following?

I have a normal html page with two links, "supervisor" and "student". Then these two link they point to a login page(login.php) that has a login form, both users use the same login form, but the titles on the pages change. :((

Then in the login form page only for supervisors, there's a link to go to registration form, so that if supervisors are not registered yet, they may do so. This is not available for students, since supervisors create the students.

Then after successful login, for both users, supervisors and students, they are redirected to two extjs apps- supervisor goes to supervisor extjs app, then student goes to student extjs app. Both apps use the same MySQL database. (this will work?)

Could anyone help me to do this part, with php and extjs 4 please? (I have several supervisors that have several students):((

existdissolve
8 Jan 2013, 7:03 AM
This is not really a PHP question. It depends on what you want to do. You could do a multi-page app, (one page for supervisors, one for students), in which case you should start by reading this guide on the subject: http://docs.sencha.com/ext-js/4-1/#!/guide/command_app_multi

Alternatively, you could just create two entirely separate apps. In that case, each "page" for each app would simply need to include the correct app.js, and that's be the end of that.

I would suggest start with reading the documentation on creating single and multipage apps, see which fits your needs, and then ask specific questions from there.

Shabneez
8 Jan 2013, 7:48 AM
Thanks! For the php part, I was asking for the same login form but different users.

existdissolve
8 Jan 2013, 8:31 AM
I would imagine that you could easily pass a variable through the query string in the URL based on the link clicked. Then, in PHP, you could check for the existence and value of that variable and change the display of the login form as needed.

Shabneez
8 Jan 2013, 9:31 AM
Could you please show me, with an example please? :">

I have another question..a store in extjs has a config api for crud operations found on the backend? :-? Thanks

existdissolve
8 Jan 2013, 9:44 AM
I don't use PHP very much, so I'm don't have an example (besides, this isn't a PHP forum, so I don't want to derail this thread). However, Googling "php url variables" turns up some very useful links...I would start there.

Re: the API for the store, what's the question, exactly?