Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Page navigation

0 views
Skip to first unread message

Omicron

unread,
Feb 5, 2003, 12:10:26 PM2/5/03
to
I wnat to make a php page. Now if one of my guests comes to my page, he gets
on index.php where the main-part is displayed. Now when he clicks on e.g.
News, he should get to the newspart of the page (in the same script as
index.php) I mean, like http://www.somewhat.net/index.php?something=news
how does such a script has to look like?

Thanks,
Omicron


Aggro

unread,
Feb 5, 2003, 12:21:59 PM2/5/03
to

Do you want us to make php code for you, or do you want to learn how to do
it? If you answered correctly, then please proceed to the php manual and
start the learning process ;)

http://www.php.net/manual/en/

In pseudo-code

if( something == news )
{
print newspage
}
else
{
print mainpage
}


Omicron

unread,
Feb 5, 2003, 12:24:49 PM2/5/03
to

Aggro <chai...@yahoo.com> schrieb in im Newsbeitrag:
XKb0a.340$MG2...@read3.inet.fi...
I am already in the learning process...I would've got this piece of code by
myself...I was just wondering why in the address bar there is this
?something=somethingelse written...is it because if I use the get method
instead of post?

Omicron


Alan Walkington

unread,
Feb 5, 2003, 1:52:01 PM2/5/03
to

"Omicron" <Nobod...@gmx.de> wrote in message
news:b1rhgv$sqa$07$1...@news.t-online.com...

yes


--
Alan Walkington
Technical Staff
United Defense, San Jose
>
> Omicron
>
>


marius.remo...@ee.utt.ro

unread,
Feb 5, 2003, 1:55:44 PM2/5/03
to
Omicron <Nobod...@gmx.de> wrote:
// I wnat to make a php page. Now if one of my guests comes to my page, he gets
// on index.php where the main-part is displayed. Now when he clicks on e.g.
// News, he should get to the newspart of the page (in the same script as
// index.php) I mean, like http://www.somewhat.net/index.php?something=news
// how does such a script has to look like?

very simple.

if($something=="news")
{
include_once("news.php");
}
elseif(...)
{
...
}

powerboy

unread,
Feb 5, 2003, 2:12:33 PM2/5/03
to
"Omicron" <Nobod...@gmx.de> wrote in message
news:b1rhgv$sqa$07$1...@news.t-online.com...
<snip>

> I am already in the learning process...I would've got this piece of code
by
> myself...I was just wondering why in the address bar there is this
> ?something=somethingelse written...is it because if I use the get method
> instead of post?
>
> Omicron

Yes you're right, the method is GET for data sent using the URL. But if
you're intending to use this method be sure to check for special characters,
I've lost count of the number of websites that have this problem:
http://www.someserver.com/index.php?page=../../

Displays:
Warning: Unable to access ../../ in /usr/local/www/html/index.php on line x

Hopefully you can appreciate why this is...

HTH
powerboy

--
email: powe...@rarextreme.com
www: http://www.rarextreme.com


0 new messages