Jump to content
php.lv forumi

Is this possible?


L4URO

Recommended Posts

i am building a web app , how can i make that there are 2 users,1st user fills 1st input then presses submit and only then 2nd user can fill 2nd input,then he presses submit and again 1st user can do that. once all fields are filled there is big submit button,that puts value of the fields somewhere else. and 1st user cant see what 2nd writes,but he could technically see ,but i could hide or put something on the input that doesnt "belong" to him.


Do you have any ideas,if yes,could you give me tutorials?


Varat atbildet latviski :D


Link to comment
Share on other sites

Katram lietotājam sesijā glabā viņa pašreizējo ID (1 vai 2)

 

Tad tam, kas ir 1. iedod formu un rezultātu saglabā db un piestorē klāt arī lietotāja ID kam nākošajam jāpilda.

 

Pie katra refreša atlasi no db ierakstu ar to ID, kas pašlaik ir lietotājam.

Link to comment
Share on other sites

Katram lietotājam sesijā glabā viņa pašreizējo ID (1 vai 2)

 

Tad tam, kas ir 1. iedod formu un rezultātu saglabā db un piestorē klāt arī lietotāja ID kam nākošajam jāpilda.

 

Pie katra refreša atlasi no db ierakstu ar to ID, kas pašlaik ir lietotājam.

bet uz ko balstoties saglabāt sesiju? Login ,kad ielogojas es saglabāju sesiju balstoties uz to,vai cilvēks ir ievadījis tādus datus,kādi pastāv datubāzē,tad es sastādu sesiju un pēc sesijas balstoties izvadu pārējo info par viņu,kas ir datubāzē. 

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...