2013/4/5 xmujay@gmail.com xmujay@gmail.com:
thanks Marc,
I updated my pull requests and seperate them to two requests.
- function PMA_sqlQueryFormInsert refactor:
https://github.com/phpmyadmin/phpmyadmin/pull/230 https://github.com/phpmyadmin/phpmyadmin/pull/229
one more issue, Function A call Function B, but in function B, there will be echo render html. currently, I will echo the html out before enter Functon B.
but I have a other method, such as in Function B, just return html content out, and add to outter html.
Function A () { $html += B(); echo $html; } Function A () { $html = "<form>.."; returm $html; }
Firstly, please use bottom posting on this list [0].
There is no need to echo in either function. Let both of them return a Html string, call those functions in the place you need them and echo the result there. Or feed it to the addHtml() method from the Response class that is already defined in every file behind an accessible page. See [1] for more info on how to use this.
BTW : Using the addHtml() method is prefered, but make sure all other echo calls and direct output (Html outside <?php ?>) are converted to addHtml(), otherwise the loading of the page will brake.
[0] https://en.wikipedia.org/wiki/Posting_style#Bottom-posting [1] http://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4
Kind regards,
Dieter Adriaenssens