473,387 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

NEED HELP. Call another PHP Page in PHP

Hello, it is my first time here and I am basically a beginner at programming PHP.

I need help regrading PHP calling.

Suppose I have a page named Index.php for a site and wanted to call a page named navigator.php into the page itself. The navigator.php page is made with PHP scripts and HTML tags. Sorry I forgot the codes at home because I don't have internet connection there.

I tried using the file() function but it doesn't execute my session code in the navigator.php.

Can there be any possible way to get around this?

I'll update this post with the codes so everyone can help me analyze this. Thanks.
Apr 25 '07 #1
3 12187
Hello, it is my first time here and I am basically a beginner at programming PHP.

I need help regrading PHP calling.

Suppose I have a page named Index.php for a site and wanted to call a page named navigator.php into the page itself. The navigator.php page is made with PHP scripts and HTML tags. Sorry I forgot the codes at home because I don't have internet connection there.

I tried using the file() function but it doesn't execute my session code in the navigator.php.

Can there be any possible way to get around this?

I'll update this post with the codes so everyone can help me analyze this. Thanks.

The easiest way is to probably use the HTML <iframe> tag. That is if you really want to "embed" the other php page into the main php page.

<iframe src="navigator.php" scrolling="auto"></iframe>

file() is good for getting non-php files like xml, text and other stuff like that, but probably not for what you want here. Check out php.net for function descriptions.

If navigator.php contains functions that you want to run on your main page, just use the include statement in your main page:

<?php
include ("navigator.php");
?>

Hope this helps.
Apr 25 '07 #2
jadoo
8
Hello, it is my first time here and I am basically a beginner at programming PHP.

I need help regrading PHP calling.

Suppose I have a page named Index.php for a site and wanted to call a page named navigator.php into the page itself. The navigator.php page is made with PHP scripts and HTML tags. Sorry I forgot the codes at home because I don't have internet connection there.

I tried using the file() function but it doesn't execute my session code in the navigator.php.

Can there be any possible way to get around this?

I'll update this post with the codes so everyone can help me analyze this. Thanks.
I am not sure this will help u or not but i think if u want to use the index.php in the navigator.php u can do this by using require (),or include() function .may be these help u.u can read about this at php.net official site of php.

Hope it may help u.
Good Luck
Apr 25 '07 #3
Thanks for the help guys, i'll try it later, then i'll post for updates. Thank you again
rogerpride
The easiest way is to probably use the HTML <iframe> tag. That is if you really want to "embed" the other php page into the main php page.

<iframe src="navigator.php" scrolling="auto"></iframe>

file() is good for getting non-php files like xml, text and other stuff like that, but probably not for what you want here. Check out php.net for function descriptions.

If navigator.php contains functions that you want to run on your main page, just use the include statement in your main page:

<?php
include ("navigator.php");
?>

Hope this helps.
jadoo
I am not sure this will help u or not but i think if u want to use the index.php in the navigator.php u can do this by using require (),or include() function .may be these help u.u can read about this at php.net official site of php.

Hope it may help u.
Good Luck
Apr 26 '07 #4

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

Similar topics

0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
0
by: Tim Clark | last post by:
We've been having a lot of event ID 37 with src W3SVC errors popping up. We have 50+ sites in medium isolation, and i ran IISstate on the two instances of DLLHOST and the one of inetinfo. Is there...
7
by: Jack Addington | last post by:
I've got a fairly simple application implementation that over time is going to get a lot bigger. I'm really trying to implement it in a way that will facilitate the growth. I am first writing a...
8
by: pamelafluente | last post by:
I am beginning aspNet, I know well win apps. Need a simple and schematic code example to start work. This is what I need to accomplish: ---------------------- Given button and a TextBox on a...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
2
by: Prophet | last post by:
Can someone help me troubleshoot this IISSTATE log ? I have tried to make sense out of it but with no luck I am currently running IIS5 on a Win 2k box. Hosting 3 web sites and runnning asp...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
19
by: Justin | last post by:
Harlow... i need some help on these... im actually trying to do a page using php... the function is to receive certain parameters from a 3rd party provider... and i need to redirect my page to...
4
by: pbd22 | last post by:
Hi. I have an ajax question. I am wondering if it is possible to get the response from a method within a given page, and that function alone? Traditionally, I have been getting the response...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.