I have been given a large PHP project that I am supposed to fix all the problems of.
The code has little to no documentation, and is a real mess organizationally. (Coding was outsourced to several different offshore developers)
Anyways, I am relatively new to PHP, coming from Java.
I’m using netbeans.
My question is: How can I figure out what function is being called for a specific button, and what is the best way to find where that is in the code?
Thanks,
The short answer is, “it depends.”
Is it part of a form? Is it an image that is just hyperlinked to another page? The most simple way of finding out is to view the source code of the page and find the HTML code for the button.
If it submits a tag, then look at the form’s ACTION attribute for the page that deals with the data. That page will likely retrieve the information using the $_POST or $_GET variables.