> -Original Message-
> From: Jennifer Goodie [mailto:[EMAIL PROTECTED]
> Sent: 31 July 2003 22:42
>
> > if (isset($page)) {
> > include $$_GET['page'];
> > } else {
> > $page = $home;
> > include $page;
> > }
> >
> > would that be right?
> > or should i use
> >
> > if (isset($page)) {
> >
nope, it doesn't work. it'll only call up the variables that were specified
in my files.inc.php...well so far at least
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote LoonySalmon ([EMAIL PROTECTED]):
> >
> > i want to call up my contact page, but how
* Thus wrote LoonySalmon ([EMAIL PROTECTED]):
>
> i want to call up my contact page, but how do i do it?
>
> http://localhost/index.php?page=$contact
I hope you cant use something like:
http://localhost/index.php?page=%2Fetc%2Fpasswd
Curt
--
"I used to think I was indecisive, but now I'm no
thanks jeff harris, that is exactly what my problem was,
now it works
good night all
thank a million
"Jeff Harris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Aug 1, 2003, "LoonySalmon" claimed that:
>
> |and btw, this is my code now:
> |
> | |require 'files.inc.php';
> |
>
On Aug 1, 2003, "LoonySalmon" claimed that:
|and btw, this is my code now:
|
|
--
Is $main being set inside a function?
http://www.php.net/language.variables.scope
Also, for future compatability, you should probably change the 3rd line to
"if (isset($_GET['page'])) {" That will also help incase
and btw, this is my code now:
"Loonysalmon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> well crap, it turns out that i'm back to step 1, but with more code
> it won't load up the other files now when defined through the url. i
guess
> that there is something wrong, but w
well crap, it turns out that i'm back to step 1, but with more code
it won't load up the other files now when defined through the url. i guess
that there is something wrong, but what could it be?
"Loonysalmon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> if (isset($page)) {
> i
Jennifer Goodie wrote:
I don't think I'd let someone pass any page they wanted via a get and just
include that page.
If you have URL fopen wrappers on I can create a page on my server and
include it to your page and pretty much execute any code I want on your
server.
example:
http://www.yourdomai
> if (isset($page)) {
> include $$_GET['page'];
> } else {
> $page = $home;
> include $page;
> }
>
> would that be right?
> or should i use
>
> if (isset($page)) {
> include $$_GET['page'];
> } else {
> include $home;
> }
>
> hopefully that's right. if so, pretty good for a n00b
>
I don't think I
for some odd reason, $home wasn't working, so i changed home to main and now
it works
thanks for all the good support guys/gals?
L00NY54LM0N - 16 year old coder in the makin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
is there anyway where i can check if page is defined in the url?
not sure I know exactly what you mean but I think you could use
something like this
$foo = @include("index.php");
if ($foo) {
//index.php was valid
} else {
//index.php was not valid
}
there also might be a better way to do th
if (isset($page)) {
include $$_GET['page'];
} else {
$page = $home;
include $page;
}
would that be right?
or should i use
if (isset($page)) {
include $$_GET['page'];
} else {
include $home;
}
hopefully that's right. if so, pretty good for a n00b
--
PHP General Mailing List (http://www.php.n
LoonySalmon wrote:
if page is defined in url, include page defined
else include home
You are on the right track. Take a look at the manual.
http://us4.php.net/manual/en/index.php
http://us4.php.net/isset
- Brad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
ok
i have that done, but now i can't just have index.php because i get an error
is there anyway where i can check if page is defined in the url?
if so, could somebody make me a simple script? this is my first time with
php
i'm guessing that it would be something like this, but summed up
if pa
LoonySalmon wrote:
that isn't really what i want
i want to have a seperate file where i declare the variables.
what i'm getting at here is this, well, take a look at this page:
http://l33trus.servebeer.com/site/index.php
i just want to include a page into the table where it says that it's
included
that isn't really what i want
i want to have a seperate file where i declare the variables.
what i'm getting at here is this, well, take a look at this page:
http://l33trus.servebeer.com/site/index.php
i just want to include a page into the table where it says that it's
included
what i'm going fo
> http://localhost/index.php?page=contact.html
>
> And get rid of your hard-coded set for $contact, and use
> $_GET['contact'] instead.
My apologies. I meant $_GET['page'].
Chris
=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
--
PHP General Mai
--- LoonySalmon <[EMAIL PROTECTED]> wrote:
> INDEX.PHP
> > require 'files.inc.php';
> $page = $home;
> include $page;
> ?>
>
> FILES.INC.PHP
> > $home = 'home.html';
> $forum = 'forum/index.php';
> $contact = 'contact.html';
> ?>
>
> http://localhost/index.php?page=$contact
http://localhost/in
lol, yet again i need some more help
as you guys can see from the scripts before, i am including a file into a
page. now my only problem is trying to include a different file.
what i have
INDEX.PHP
FILES.INC.PHP
i want to call up my contact page, but how do i do it?
http://localhost/in
I think you want
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
thanks everybody
now it works
"Loonysalmon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> i am looking to use includes on my page,
> this is the code that i want to use to call my files with:
>
> INDEX.PHP
>
> require 'files.inc.php';
> $page = '$home';
> include '$page';
> ?>
>
>
21 matches
Mail list logo