How to access a method of the class page?

I know that question maybe you can Google and watch on the basics. I know.. there is a problem with the practical part
There is a page of a php. Class hand and connects to this page. Need to refer to the logout method described in the class by clicking the link..but what happens is, after the authorization, whichever link I clicked, then there is a redirect to the login page - ie exits accounts.

< a href="logout()?>" class="text-custom"> a>
Don't really want to do a crutch and to make reference to the page handler. Maybe there is a solution that I have found.
Help pozhluysta
July 8th 19 at 15:36
2 answers
July 8th 19 at 15:38
Solution
The interaction between the client and serverom nowadays is done using AJAX requests.
Next, sorry, but Google themselves. The theme is common.
the problems do not) know ajax.. I just wanted to find a solution how to do it frameworks - in the prescribed ranting and running.. was thinking to implement this approach.. but odd blunted - Felipe commented on July 8th 19 at 15:41
: so be smart and all will be well. :) - vito.Hoeg commented on July 8th 19 at 15:44
: :D well, all in due time of becoming a professional being stupid)) so I think it will take me - Felipe commented on July 8th 19 at 15:47
July 8th 19 at 15:40
exits accounts

This is logical, since the page generation this method fulfills. Imagine if the browser was given would be PHP, which you can change and launch on click. Nonsense? Nonsense.

You need to link to a script where this method will be called, otherwise not.

Find more questions by tags PHP