Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Spam & Chat PHP Include...
Rayc
Posted on 11 Mar 2011, 15:36:12

Access: Member
Total Posts: 74
Joined: 2010-06-13

I'm putting this in the SPAM section as it is way OT regarding N-13 News, but I know somebody here knows...:innocent:

I'm experimenting with a simple Event Calendar script. It's written in PHP, and has three main output files.

index.php lists all events with all details.
index1.php lists all events with basic details
event.php lists a single event with all details.

Each is a stand-alone php file that can be called directly from the URL and will display the information. index1.php creates a link to event.php so that someone can get more detailed information.

So far so good.

Now, I'm trying to use a PHP include to embed this into an existing web page. I can ebmed index.php to show all information, no prob. And I can embed index1.php to show basic information.

But when the link in the basic info is clicked to call event.php I have a problem. Initially the path was wrong, so I fixed it to point to right place. But now I get a separate page with the detailed listing.

What I'd like to happen is for the detailed listing to also be shown embedded in the page as if it were "included".

I hope that makes sense. I'm not expecting someone to do this for me, just some guidance. My possible lines of approach are:
- figure out how to swap out the "included" file when the link is clicked
- somehow change event.php into a function called by index1.php - combine event.php and index1.php into a single php file

Here's my experimental page with index1 included:
http://soundsinsync.ca/newstest/html/scroll_the_news.php
And here are direct URL to each of the files:
http://soundsinsync.ca/events/index.php
http://soundsinsync.ca/events/index1.php
http://soundsinsync.ca/events/event.php?id=1

Suggestions?
#3340
Network-13.com © 2013