Hey there. This will be an extremely long post/thread, consisting of some relitivly advanced concepts. I'm really not sure if it can even be done. Any help is massivly appreciated.
I'm working on a project, called 'prog'. Its a RPG style webpage based game, focusing on php/sql as a backend. Imagine it to be something quite like the gameboy zelda games, shining force, things like that.
The problem, is with the 4x4 map, which looks something like this;

The naming system for the individual cells are as follows;

This map is generated via a very basic mysql table. Another table holds details concerning the current position of a player on the map. Now imagine the following scenario;

I would like the player to move to a position on the map by a simple click on the cell. In the diagram, the user is at 2.2, and needs to get to 4.4. Clicking on each cell adjacently, I can code a system that moves the player via basic update querys. However. I would now like for the player to click this cell, 4.4, and have some php code work out the shortest route, and then take it automaticly, trackling the number of cells traversed in the interrim.
Along with this, some cells are not travesable, imagine cell 3.3 is not, in the example above, this means the route would have to be 3.2, 4.2, 4.3, 4.4.
The problem, is that I cant even think of any psudo code, even, in order to get started, and I very much need many third opinions.
Many thanks in advance, any considerable help will definatly be included within the project credits file and other places where appropreiate.