473,473 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Can't include page on another php page

106 New Member
Hi,

I want to include a php page if the url as the variable ?logout

My objective is to show a page (logout-message.php) once user logouts (he goes automatically to mysite.com/?logout)

Please note that the logout-message.php page contains a frame, so want I want is to display that frame over the index page (mysite.com/).

Here's what I have:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. if(isset($_GET['logout']))
  3. include("logout-message.php");
  4. ?>
The code above is on the index page.

The problem I'm encountering is that the php include seems to take away all the rest of the page. When i navigate to mysite.com/?logout I see only the content of the logout-message.php page, the content of the index page is gone!

I'd appreciate your help, thanks in advance.

If you know of an easier way to do want I want, like i.e. something like php if .... (same as above) .. display content of another page.. i don't know... i'm a newbie on php..

What I want is to display the content of an external page (over the already existing index page) if the url has ?logout.

thank You.
May 5 '10 #1
1 1624
dlite922
1,584 Recognized Expert Top Contributor
Where is that php code snip you pasted above? is it in index.php or?

Don't know the layout of your page, but your code should work if it's in the proper place.

Let's see your entire code.






Dan
May 5 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: | last post by:
Can I link to another page with a <input type=button> without javascript??? Thanks
4
by: Bik | last post by:
I'm building a list of customer orders via ASP/VBscript. e.g: 51 John Doe $1,201.50 52 Jane Smith $ 500.00 53 Jim Miller $1,250.25 I want order numbers 51, 52, 53 hyperlinked...
1
by: Mike John | last post by:
how can i include the current page in the body of the email. I was only to put text. Syntax: <html> <body> <input type ="Button" onclick= "eman()"> <SCRIPT LANGUAGE=JAVASCRIPT>
2
by: Aamir Mahmood | last post by:
Hello, Can I include a control or another aspx file into a container aspx file on the basis of some parameters?\ Like I want ControlA to be inserted in page index.aspx if the submit form has...
2
by: Ricardo | last post by:
How can I navigate to another page via a button, and pass a variable to this next page... How can I do this via that method that I see in other sites that the url goes like this: ...
4
by: Andrea De Santi | last post by:
How can I redirect to another page with form data? In asp Classic I write: <form ... action="filename">...</form> and in then target page I write <%=request.form("fieldname")%> ..... but in...
1
by: basulasz | last post by:
I have an authenticate page in ASP format. I want to include it in my ASP.NET project, in such a way that, I want it to run everytime when any request to my ASP.NET project pages occurs. The user...
2
by: thamood | last post by:
hi guys i was just wondering can i call a function from another page and get the return value? like if i had page1.php which have the function fun1() can i call this function from another page ??...
2
by: Valli | last post by:
Hi, My project contains 20 htm pages. All these page conatins login button where the click of login button transfers to login.htm page. All these modules were designed by my colleague. My part...
1
by: gopim | last post by:
in my registration page having around 20 fields,it is very difficult for users. i want to devide this registratino for into two sections.but my doubt is how can we store first section values with...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.