Rooms Management does not save

Discuss everything related to PHP Hotel Site. All versions. Any questions related to the PHP Hotel Site developing or using should be posted to this forum.

Moderator: alexandrleonenko

maurito
Newbie
Newbie
Posts: 7
Joined: Mar 2nd, '16, 19:27

Rooms Management does not save

Postby maurito » May 30th, '16, 15:17

Hello
I have problems to create new rooms. Every time I create a new room: description, Room details,..are not saved, I have to repeat and repeat the procedure, until they are saved. I do not receive error message when a room is not saved. Simply nothing happens, i press update and the page is reloaded, but room is not created. After 3 or 4 times, i am able to create. I can't understand why

ne_moj
Master
Master
Posts: 243
Joined: Jan 1st, '16, 14:11

Re: Rooms Management does not save

Postby ne_moj » May 31st, '16, 04:20

This happens due to the fact that the token is used (it protects against "Cross-site request forgery", you can read about it here https://en.wikipedia.org/wiki/Cross-sit ... st_forgery). Perhaps you are working with a script in multiple tabs (in browser), or perhaps you've made changes to the script. In any case, you can disable this check in file "include/shared.inc.php":

Replace this line:

Code: Select all

...
if($token_session != $token_post){
...


On this line:

Code: Select all

...
if(0 && $token_session != $token_post){
...


Return to “ApPHP HotelSite / uHotelBooking Talk {developers/users}”