PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
i have a page and inside that page i have multiple tabs, and inside those tabs i want to add some sort of page that is in another php file, something like this
do you want it to repost back to content.php as in content.php?tab=1 or just change when they change the tab, because that would be more of a JavaScript project.
this function was the one that i use before i include content.php into main.php, but now i want to refresh only content.php without refreshing main.php, is that possible ?
You find there is a lot of information on the web about AJAX. XMLHttp is effectively the core thing you need so the initial tutorial is well worth a read to get the principle understood. (Although not strictly true the label "AJAX" is to me just a marketing tag). It should also be worth noting that not everyone uses javascript, therefore you should build pages with no javascript first. Then add in additional functionality (like AJAX) afterwards so it always works. I personally like the tag "enhanced by javascript".
There are several Javascript libraries out there which can help (prototype and Jquery being two) if you do not want to build your own thing.