N
N
N-Den2015-05-04 21:32:49
PHP
N-Den, 2015-05-04 21:32:49

How to shorten and improve a self-written working calendar (PHP + Ajax + Datapicker)?

Hello Programming Guru and Beginners!

I have been learning PHP for only half a year. There was a need to create a calendar on with Ajax and Datapicker. Without expecting it, I wrote a working version in the image and likeness of various scripts. I am only marginally familiar with JS, as well as with Ajax. For now. :)
Link to files:
Technically, everything suits me in "my own composition", except that the calendar body output script and its handler are identical in both files. What are the qualitative ways to solve this problem? Of course: flies from cutlets separately, but I can’t figure out what and where.
Is it possible to do with one file? Bearing in mind that Ajax needs a url where the handler "sits" (Google, Yandex and others are tired of me looking for a solution to this problem).
In your opinion, how would you shorten/optimize/make the code more readable? What advice would you give when looking at work?
Is it true that if my code is written in one line, then the execution of the script will take less resources?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nazar Mokrinsky, 2015-05-04
@nazarpc

If the code was on GitHub or somewhere else where you can immediately see it, I would still go, but otherwise - sorry, but you are not in the right place with such questions.
The deepest delusion, if you just write in one line - it will be impossible to understand what is written there, but it will work in exactly the same way.

I
IceJOKER, 2015-05-04
@IceJOKER

Am I the only one confused that the file is in VK? O_O
Nothing, of course, but damn it xD
Do you really think that someone would want to download the file, parse the code and volunteer to help you optimize the code?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question