alapimba Posted October 25, 2007 Share Posted October 25, 2007 Hello, Can anyone please help me building a site in php? Basicly what i want to do is: i have a bunch of links. when i click that links the dynamic content from a mysql db appear above the links. I need to do this without open a new page because i'm using mootools with the acoordeon script, and inside each "tab" theres contents. when i'm inside one tab i want to have links, and clicking each link new contents appears. Don't know if i'm explaining clear what i want to do... When i do this opening a new page is easy, i just put on the links something like newpage.php?id=games and then the page newpage.php open and the recordeset from games is echoed. but how to do that without leaving the page? refreshing or something like that.. i'm lost :/ Thanks in advance. btw.. i'm working with dreamweaver but i can write the code on had with no problem Quote Link to comment https://forums.phpfreaks.com/topic/74713-refresh-page-with-new-contents/ Share on other sites More sharing options...
AtomicNetwork Posted October 25, 2007 Share Posted October 25, 2007 Do it the same as you would to open a new file, but instead of parsing the information to another page, parse it back to the page your on. <?php while($data = mysql_fetch_array($sql_query){ if($_GET[id] = $data[link_id]){ // display information } // Show link } ?> Basically, loop through the links in the database, and then foreach one check to see if the parsed value matches the value in the database.... If it does, display the information relating to that link, if not do nothing - just display the rest of the links. I don't fully understand what you are tyring to do, so the code above may be completely along the wrong lines Quote Link to comment https://forums.phpfreaks.com/topic/74713-refresh-page-with-new-contents/#findComment-377704 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.