By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,828 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,828 IT Pros & Developers. It's quick & easy.

url rewiting

P: n/a
I fairly new new to running my own apache server and I think I may have a
configuration issue.
I've tried asking in alt.apache.configuration but have not had any response
so I'm hoping someone here can help.

I've got the apache server running with the php 4 and mysql modules running
fine, I know this cause I can call php'd html pages. My problem is when I
try and execute something like :-

echo("<a href=\"$PHP_SELF?page=5">PREV</a>");

when the page is reloaded and I echo out $page, it's never has a value.
Simon
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Simon Redmond wrote:
I fairly new new to running my own apache server and I think I may have a
configuration issue.
I've tried asking in alt.apache.configuration but have not had any response
so I'm hoping someone here can help.

I've got the apache server running with the php 4 and mysql modules running
fine, I know this cause I can call php'd html pages. My problem is when I
try and execute something like :-

echo("<a href=\"$PHP_SELF?page=5">PREV</a>");

when the page is reloaded and I echo out $page, it's never has a value.
Simon

That would most likely have to do with register_globals being off as of
version 4.2.0 its off by default and you should use the new superglobal
arrays to access information as stated on
http://www.php.net/manual/en/languag...predefined.php. So try
something like echo $_GET['page']; and I bet it works.

Jul 17 '05 #2

P: n/a
John Downey wrote:
Simon Redmond wrote:
I fairly new new to running my own apache server and I think I may have a
configuration issue.
I've tried asking in alt.apache.configuration but have not had any
response
so I'm hoping someone here can help.

I've got the apache server running with the php 4 and mysql modules
running
fine, I know this cause I can call php'd html pages. My problem is when I
try and execute something like :-

echo("<a href=\"$PHP_SELF?page=5">PREV</a>");


It seems to me this technique would also work for my problem ("One
script, multiple transactions"). Correct? Clever stuff; there's a lot
of room for programmer creativity in web programming.

--
--
Lynn Wallace http://www.xmission.com/~lawall
"I'm not proud. We really haven't done everything we could to protect
our customers. Our products just aren't engineered for security."
--Microsoft VP in charge of Windows OS Development, Brian Valentine.

Jul 17 '05 #3

P: n/a
Raptor wrote:
It seems to me this technique would also work for my problem ("One
script, multiple transactions"). Correct? Clever stuff; there's a lot
of room for programmer creativity in web programming.


Well, yes, I have a site with just about every single page being generated
by the same PHP script, which allows you to do common tasks all in the
same place, etc.
Jul 17 '05 #4

P: n/a
Matty wrote:
Raptor wrote:

It seems to me this technique would also work for my problem ("One
script, multiple transactions"). Correct? Clever stuff; there's a lot
of room for programmer creativity in web programming.

Well, yes, I have a site with just about every single page being generated
by the same PHP script, which allows you to do common tasks all in the
same place, etc.

Most sites I build like my Sage engine (shameless self ad because its
currently in idle development) run off the idea of modules. Where the
index.php interfaces with multiple classes that act independently of
each other.

--
John Downey
http://delusive.dyn.ee
http://sage.dev.box.sk
http://blacksun.box.sk

Jul 17 '05 #5

P: n/a
John Downey wrote:

Well, yes, I have a site with just about every single page being
generated by the same PHP script, which allows you to do common tasks all
in the same place, etc.

Most sites I build like my Sage engine (shameless self ad because its
currently in idle development) run off the idea of modules. Where the
index.php interfaces with multiple classes that act independently of
each other.


Yeah, phpnuke, etc, use a similar system, and i think phpfusebox does to
some extent too - it's a lot better than having twenty different callable
php files, which one way or anopther have to include the same files, do
the same work, etc

Also makes updating the site easier
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.