How do i run a PHP function inside jQuery click event. I have the following which is not correct. when the user clicks on a button, i want a new directly created.
You need to issue an AJAX call of some kind in order to communicate with the Server. There's no way for JavaScript to create directories on your Remote Server (this would be a huge security hole otherwise).